planetdump: Verify we can connect to DB before we do anything else
authorJon Burgess <jburgess777@gmail.com>
Wed, 4 Feb 2009 20:56:43 +0000 (20:56 +0000)
committerJon Burgess <jburgess777@gmail.com>
Wed, 4 Feb 2009 20:56:43 +0000 (20:56 +0000)
planet05.c
planet06.c

index 7f8d955..43ddd6b 100644 (file)
@@ -796,6 +796,9 @@ int main(int argc, char **argv)
     }
     connection_close(mysql);
     mysql = NULL;
+#else
+    /* Check we can connect to database */
+    connection_close(connection_open());
 #endif
 
     printf("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
index 8a6354c..e04628f 100644 (file)
@@ -802,6 +802,9 @@ int main(int argc, char **argv)
     }
     connection_close(mysql);
     mysql = NULL;
+#else
+    /* Check we can connect to database */
+    connection_close(connection_open());
 #endif
 
     printf("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");