00001 #include <grass/dbmi.h> 00002 #include "macros.h" 00003 00010 int 00011 db_close_database (dbDriver *driver) 00012 { 00013 int ret_code; 00014 00015 /* start the procedure call */ 00016 db__set_protocol_fds (driver->send, driver->recv); 00017 DB_START_PROCEDURE_CALL (DB_PROC_CLOSE_DATABASE); 00018 00019 /* get the return code for the procedure call */ 00020 DB_RECV_RETURN_CODE (&ret_code); 00021 00022 if (ret_code != DB_OK) 00023 return ret_code; /* ret_code SHOULD == DB_FAILED */ 00024 00025 /* there is no data sent back from this procedure call */ 00026 return DB_OK; 00027 }