[GRASS-SVN] r37734 - grass/branches/develbranch_6/lib/db/dbmi_client

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jun 4 15:43:50 EDT 2009


Author: neteler
Date: 2009-06-04 15:43:50 -0400 (Thu, 04 Jun 2009)
New Revision: 37734

Modified:
   grass/branches/develbranch_6/lib/db/dbmi_client/db.c
Log:
catch error (thanks to Glynn)

Modified: grass/branches/develbranch_6/lib/db/dbmi_client/db.c
===================================================================
--- grass/branches/develbranch_6/lib/db/dbmi_client/db.c	2009-06-04 19:43:44 UTC (rev 37733)
+++ grass/branches/develbranch_6/lib/db/dbmi_client/db.c	2009-06-04 19:43:50 UTC (rev 37734)
@@ -3,7 +3,7 @@
  * 
  * \brief DBMI Library (client) - open/close driver/database connection
  *
- * (C) 1999-2008 by the GRASS Development Team
+ * (C) 1999-2009 by the GRASS Development Team
  *
  * This program is free software under the GNU General Public
  * License (>=v2). Read the file COPYING that comes with GRASS
@@ -57,12 +57,13 @@
 
   \param driver db driver
 
-  \return DB_OK
+  \return DB_OK or DB_FAILED
 */
 int db_close_database_shutdown_driver(dbDriver * driver)
 {
-    db_close_database(driver);
-    db_shutdown_driver(driver);
+    int status = db_close_database(driver);
+    if (db_shutdown_driver(driver) != 0)
+        status = DB_FAILED;
 
-    return DB_OK;
+    return status;
 }



More information about the grass-commit mailing list