GRASS Programmer's Manual  6.4.2(2012)
c_closedb.c
Go to the documentation of this file.
00001 
00015 #include <grass/dbmi.h>
00016 #include "macros.h"
00017 
00026 int db_close_database(dbDriver * driver)
00027 {
00028     int ret_code;
00029 
00030     /* start the procedure call */
00031     db__set_protocol_fds(driver->send, driver->recv);
00032     DB_START_PROCEDURE_CALL(DB_PROC_CLOSE_DATABASE);
00033 
00034     /* get the return code for the procedure call */
00035     DB_RECV_RETURN_CODE(&ret_code);
00036 
00037     if (ret_code != DB_OK)
00038         return ret_code;        /* ret_code SHOULD == DB_FAILED */
00039 
00040     /* there is no data sent back from this procedure call */
00041     return DB_OK;
00042 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines