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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Dec 30 20:49:11 CET 2009


Author: mattm
Date: 2009-12-30 20:49:09 +0100 (Wed, 30 Dec 2009)
New Revision: 6286

Modified:
   trunk/openvas-manager/ChangeLog
   trunk/openvas-manager/src/tasks_sql.h
Log:
	* src/tasks_sql.h: Replace SQL END with ROLLBACK.

Modified: trunk/openvas-manager/ChangeLog
===================================================================
--- trunk/openvas-manager/ChangeLog	2009-12-30 19:47:31 UTC (rev 6285)
+++ trunk/openvas-manager/ChangeLog	2009-12-30 19:49:09 UTC (rev 6286)
@@ -1,5 +1,9 @@
 2009-12-30  Matthew Mundell <matthew.mundell at intevation.de>
 
+	* src/tasks_sql.h: Replace SQL END with ROLLBACK.
+
+2009-12-30  Matthew Mundell <matthew.mundell at intevation.de>
+
 	* src/tests/omp_help_0.c (help_text): Match to current value.
 
 	* src/tests/omp_get_configs_0.c, src/tests/omp_get_configs_1.c,

Modified: trunk/openvas-manager/src/tasks_sql.h
===================================================================
--- trunk/openvas-manager/src/tasks_sql.h	2009-12-30 19:47:31 UTC (rev 6285)
+++ trunk/openvas-manager/src/tasks_sql.h	2009-12-30 19:49:09 UTC (rev 6286)
@@ -804,7 +804,7 @@
 
   if (manage_db_version () != 0)
     {
-      sql ("END;");
+      sql ("ROLLBACK;");
       return -1;
     }
 
@@ -860,7 +860,7 @@
 
   if (manage_db_version () != 1)
     {
-      sql ("END;");
+      sql ("ROLLBACK;");
       return -1;
     }
 
@@ -916,7 +916,7 @@
 
   if (manage_db_version () != 2)
     {
-      sql ("END;");
+      sql ("ROLLBACK;");
       return -1;
     }
 
@@ -970,7 +970,7 @@
 
   if (manage_db_version () != 3)
     {
-      sql ("END;");
+      sql ("ROLLBACK;");
       return -1;
     }
 
@@ -1470,7 +1470,7 @@
 
   if (manage_db_version () != 4)
     {
-      sql ("END;");
+      sql ("ROLLBACK;");
       return -1;
     }
 
@@ -1572,7 +1572,7 @@
                          predefined_config_id);
       if (name == NULL)
         {
-          sql ("END;");
+          sql ("ROLLBACK;");
           abort ();
         }
       quoted_name = sql_quote (name);
@@ -1601,7 +1601,7 @@
 
   if (manage_db_version () != 5)
     {
-      sql ("END;");
+      sql ("ROLLBACK;");
       return -1;
     }
 
@@ -1641,7 +1641,7 @@
       g_warning ("%s: a predefined config has moved from the standard location,"
                  " giving up\n",
                  __FUNCTION__);
-      sql ("END;");
+      sql ("ROLLBACK;");
       return -1;
     }
 
@@ -1672,7 +1672,7 @@
 
   if (manage_db_version () != 6)
     {
-      sql ("END;");
+      sql ("ROLLBACK;");
       return -1;
     }
 
@@ -1705,7 +1705,7 @@
 
   if (manage_db_version () != 7)
     {
-      sql ("END;");
+      sql ("ROLLBACK;");
       return -1;
     }
 
@@ -2083,7 +2083,7 @@
                quoted_name))
     {
       g_free (quoted_name);
-      sql ("END;");
+      sql ("ROLLBACK;");
       return 1;
     }
 
@@ -2167,7 +2167,7 @@
                quoted_name))
     {
       g_free (quoted_name);
-      sql ("END;");
+      sql ("ROLLBACK;");
       return 1;
     }
   sql ("DELETE FROM escalator_condition_data"
@@ -5258,7 +5258,7 @@
         if (config_name == NULL)
           {
             g_free (rc);
-            sql ("END");
+            sql ("ROLLBACK");
             return -1;
           }
 
@@ -5267,7 +5267,7 @@
           {
             free (config_name);
             g_free (rc);
-            sql ("END");
+            sql ("ROLLBACK");
             return -1;
           }
 
@@ -5277,7 +5277,7 @@
             free (config_name);
             free (target);
             g_free (rc);
-            sql ("END");
+            sql ("ROLLBACK");
             return -1;
           }
         quoted_selector = sql_quote (selector);
@@ -5289,7 +5289,7 @@
             free (config_name);
             free (target);
             g_free (rc);
-            sql ("END");
+            sql ("ROLLBACK");
             return -1;
           }
         else if (config == 0)
@@ -5298,7 +5298,7 @@
             free (config_name);
             free (target);
             g_free (rc);
-            sql ("END");
+            sql ("ROLLBACK");
             return -1;
           }
         else
@@ -5323,7 +5323,7 @@
               {
                 free (config_name);
                 g_free (rc);
-                sql ("END");
+                sql ("ROLLBACK");
                 return -1;
               }
             set_target_hosts (target, hosts);
@@ -5337,7 +5337,7 @@
             if (insert_rc_into_config (config, quoted_config_name, (gchar*) rc))
               {
                 g_free (rc);
-                sql ("END");
+                sql ("ROLLBACK");
                 return -1;
               }
             g_free (rc);
@@ -5781,7 +5781,7 @@
                quoted_name))
     {
       g_free (quoted_name);
-      sql ("END;");
+      sql ("ROLLBACK;");
       return 1;
     }
 
@@ -5850,7 +5850,7 @@
                quoted_name))
     {
       g_free (quoted_name);
-      sql ("END;");
+      sql ("ROLLBACK;");
       return 1;
     }
   sql ("DELETE FROM targets WHERE name = '%s';", quoted_name);
@@ -6134,7 +6134,7 @@
       g_warning ("%s: sqlite3_prepare failed: %s\n",
                  __FUNCTION__,
                  sqlite3_errmsg (task_db));
-      /** @todo END if in transaction. */
+      /** @todo ROLLBACK if in transaction. */
       abort ();
     }
 
@@ -6486,7 +6486,7 @@
                quoted_name))
     {
       tracef ("   config \"%s\" already exists\n", name);
-      sql ("END;");
+      sql ("ROLLBACK;");
       g_free (quoted_name);
       return 1;
     }
@@ -6495,7 +6495,7 @@
                quoted_name))
     {
       tracef ("   NVT selector \"%s\" already exists\n", name);
-      sql ("END;");
+      sql ("ROLLBACK;");
       g_free (quoted_name);
       return -1;
     }
@@ -6518,7 +6518,7 @@
   config = sqlite3_last_insert_rowid (task_db);
   if (insert_rc_into_config (config, quoted_name, rc))
     {
-      sql ("END;");
+      sql ("ROLLBACK;");
       g_free (quoted_name);
       return -1;
     }
@@ -6559,7 +6559,7 @@
                quoted_name))
     {
       tracef ("   config \"%s\" already exists\n", name);
-      sql ("END;");
+      sql ("ROLLBACK;");
       g_free (quoted_name);
       g_free (quoted_config);
       g_free (quoted_config_selector);
@@ -6570,7 +6570,7 @@
                quoted_config)
       == 0)
     {
-      sql ("END;");
+      sql ("ROLLBACK;");
       g_free (quoted_name);
       g_free (quoted_config);
       g_free (quoted_config_selector);
@@ -6582,7 +6582,7 @@
                quoted_name))
     {
       tracef ("   NVT selector \"%s\" already exists\n", name);
-      sql ("END;");
+      sql ("ROLLBACK;");
       g_free (quoted_name);
       g_free (quoted_config);
       g_free (quoted_config_selector);
@@ -6664,7 +6664,7 @@
                quoted_name))
     {
       g_free (quoted_name);
-      sql ("END;");
+      sql ("ROLLBACK;");
       return 1;
     }
   sql ("DELETE FROM nvt_selectors WHERE name = '%s';",
@@ -6929,7 +6929,7 @@
                    quoted_config))
         {
           g_free (quoted_config);
-          sql ("END;");
+          sql ("ROLLBACK;");
           return 1;
         }
 
@@ -6964,7 +6964,7 @@
                quoted_config))
     {
       g_free (quoted_config);
-      sql ("END;");
+      sql ("ROLLBACK;");
       return 1;
     }
 
@@ -7085,7 +7085,7 @@
                quoted_config))
     {
       g_free (quoted_config);
-      sql ("END;");
+      sql ("ROLLBACK;");
       return 1;
     }
 
@@ -8619,7 +8619,7 @@
                quoted_config))
     {
       g_free (quoted_config);
-      sql ("END;");
+      sql ("ROLLBACK;");
       return 1;
     }
 
@@ -8630,7 +8630,7 @@
       if (switch_representation (config, constraining))
         {
           g_free (quoted_config);
-          sql ("END;");
+          sql ("ROLLBACK;");
           return -1;
         }
       constraining = constraining == 0;
@@ -8641,7 +8641,7 @@
     {
       /* The config should always have a selector. */
       g_free (quoted_config);
-      sql ("END;");
+      sql ("ROLLBACK;");
       return -1;
     }
   quoted_selector = sql_quote (selector);
@@ -9168,7 +9168,7 @@
                quoted_name))
     {
       g_free (quoted_name);
-      sql ("END;");
+      sql ("ROLLBACK;");
       return 1;
     }
 
@@ -9216,7 +9216,7 @@
                            &exe, &exe_size))
     {
       g_free (quoted_name);
-      sql ("END;");
+      sql ("ROLLBACK;");
       return -1;
     }
 
@@ -9280,7 +9280,7 @@
                 g_warning ("%s: sqlite3_prepare failed with NULL stmt: %s\n",
                            __FUNCTION__,
                            sqlite3_errmsg (task_db));
-                sql ("END;");
+                sql ("ROLLBACK;");
                 g_free (public_key);
                 g_free (private_key);
                 g_free (rpm);
@@ -9293,7 +9293,7 @@
         g_warning ("%s: sqlite3_prepare failed: %s\n",
                    __FUNCTION__,
                    sqlite3_errmsg (task_db));
-        sql ("END;");
+        sql ("ROLLBACK;");
         g_free (public_key);
         g_free (private_key);
         g_free (rpm);
@@ -9316,7 +9316,7 @@
         g_warning ("%s: sqlite3_prepare failed: %s\n",
                    __FUNCTION__,
                    sqlite3_errmsg (task_db));
-        sql ("END;");
+        sql ("ROLLBACK;");
         g_free (public_key);
         g_free (private_key);
         g_free (rpm);
@@ -9338,7 +9338,7 @@
         g_warning ("%s: sqlite3_prepare failed: %s\n",
                    __FUNCTION__,
                    sqlite3_errmsg (task_db));
-        sql ("END;");
+        sql ("ROLLBACK;");
         g_free (private_key);
         g_free (rpm);
         g_free (deb);
@@ -9365,7 +9365,7 @@
         g_warning ("%s: sqlite3_prepare failed: %s\n",
                    __FUNCTION__,
                    sqlite3_errmsg (task_db));
-        sql ("END;");
+        sql ("ROLLBACK;");
         g_free (base64);
         g_free (deb);
         g_free (exe);
@@ -9389,7 +9389,7 @@
         g_warning ("%s: sqlite3_prepare failed: %s\n",
                    __FUNCTION__,
                    sqlite3_errmsg (task_db));
-        sql ("END;");
+        sql ("ROLLBACK;");
         g_free (base64);
         g_free (exe);
         return -1;
@@ -9412,7 +9412,7 @@
         g_warning ("%s: sqlite3_prepare failed: %s\n",
                    __FUNCTION__,
                    sqlite3_errmsg (task_db));
-        sql ("END;");
+        sql ("ROLLBACK;");
         g_free (base64);
         return -1;
       }
@@ -9431,7 +9431,7 @@
             g_warning ("%s: sqlite3_step failed: %s\n",
                        __FUNCTION__,
                        sqlite3_errmsg (task_db));
-            sql ("END;");
+            sql ("ROLLBACK;");
             return -1;
           }
       }
@@ -9463,7 +9463,7 @@
                quoted_name))
     {
       g_free (quoted_name);
-      sql ("END;");
+      sql ("ROLLBACK;");
       return 1;
     }
 
@@ -9603,7 +9603,7 @@
                quoted_name))
     {
       g_free (quoted_name);
-      sql ("END;");
+      sql ("ROLLBACK;");
       return 1;
     }
 
@@ -9659,7 +9659,7 @@
                 g_warning ("%s: sqlite3_prepare failed with NULL stmt: %s\n",
                            __FUNCTION__,
                            sqlite3_errmsg (task_db));
-                sql ("END;");
+                sql ("ROLLBACK;");
                 return -1;
               }
             break;
@@ -9667,7 +9667,7 @@
         g_warning ("%s: sqlite3_prepare failed: %s\n",
                    __FUNCTION__,
                    sqlite3_errmsg (task_db));
-        sql ("END;");
+        sql ("ROLLBACK;");
         return -1;
       }
 
@@ -9685,7 +9685,7 @@
         g_warning ("%s: sqlite3_prepare failed: %s\n",
                    __FUNCTION__,
                    sqlite3_errmsg (task_db));
-        sql ("END;");
+        sql ("ROLLBACK;");
         return -1;
       }
 
@@ -9701,7 +9701,7 @@
         g_warning ("%s: sqlite3_prepare failed: %s\n",
                    __FUNCTION__,
                    sqlite3_errmsg (task_db));
-        sql ("END;");
+        sql ("ROLLBACK;");
         return -1;
       }
 
@@ -9717,7 +9717,7 @@
         g_warning ("%s: sqlite3_prepare failed: %s\n",
                    __FUNCTION__,
                    sqlite3_errmsg (task_db));
-        sql ("END;");
+        sql ("ROLLBACK;");
         return -1;
       }
 
@@ -9734,7 +9734,7 @@
             g_warning ("%s: sqlite3_step failed: %s\n",
                        __FUNCTION__,
                        sqlite3_errmsg (task_db));
-            sql ("END;");
+            sql ("ROLLBACK;");
             return -1;
           }
       }



More information about the Openvas-commits mailing list