[Openvas-commits] r11607 - in trunk/openvas-manager: . src

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Sep 13 08:23:25 CEST 2011


Author: mattm
Date: 2011-09-13 08:23:24 +0200 (Tue, 13 Sep 2011)
New Revision: 11607

Modified:
   trunk/openvas-manager/ChangeLog
   trunk/openvas-manager/src/manage_sql.c
Log:
	* src/manage_sql.c (init_manage_process): Uppercase SQL keyword.
	(cleanup_manage_process): DETACH scap.

Modified: trunk/openvas-manager/ChangeLog
===================================================================
--- trunk/openvas-manager/ChangeLog	2011-09-13 06:22:03 UTC (rev 11606)
+++ trunk/openvas-manager/ChangeLog	2011-09-13 06:23:24 UTC (rev 11607)
@@ -1,5 +1,10 @@
 2011-09-13  Matthew Mundell <matthew.mundell at greenbone.net>
 
+	* src/manage_sql.c (init_manage_process): Uppercase SQL keyword.
+	(cleanup_manage_process): DETACH scap.
+
+2011-09-13  Matthew Mundell <matthew.mundell at greenbone.net>
+
 	* src/manage_sql.c (print_report_xml): Reluctantly init run_status.
 
 2011-09-13  Matthew Mundell <matthew.mundell at greenbone.net>

Modified: trunk/openvas-manager/src/manage_sql.c
===================================================================
--- trunk/openvas-manager/src/manage_sql.c	2011-09-13 06:22:03 UTC (rev 11606)
+++ trunk/openvas-manager/src/manage_sql.c	2011-09-13 06:23:24 UTC (rev 11607)
@@ -7588,7 +7588,7 @@
           }
       else
         {
-          sql ("ATTACH database '" OPENVAS_STATE_DIR "/scap-data/scap.db'"
+          sql ("ATTACH DATABASE '" OPENVAS_STATE_DIR "/scap-data/scap.db'"
                " AS scap;");
           scap_loaded = 1;
         }
@@ -8460,6 +8460,8 @@
     {
       if (cleanup && current_scanner_task)
         set_task_run_status (current_scanner_task, TASK_STATUS_STOPPED);
+      if (scap_loaded)
+        sql ("DETACH DATABASE scap;");
       sqlite3_close (task_db);
       task_db = NULL;
     }



More information about the Openvas-commits mailing list