Author: mattm
Date: 2016-10-17 17:09:05 +0200 (Mon, 17 Oct 2016)
New Revision: 26419

Modified:
   trunk/openvas-manager/ChangeLog
   trunk/openvas-manager/src/manage_migrators.c
Log:
        * src/manage_migrators.c (migrate_165_to_166): Skip creating the
        credential if the alert did not have login info.

Modified: trunk/openvas-manager/ChangeLog
===================================================================
--- trunk/openvas-manager/ChangeLog     2016-10-17 15:07:35 UTC (rev 26418)
+++ trunk/openvas-manager/ChangeLog     2016-10-17 15:09:05 UTC (rev 26419)
@@ -1,5 +1,10 @@
 2016-10-17  Matthew Mundell <matthew.mund...@greenbone.net>
 
+       * src/manage_migrators.c (migrate_165_to_166): Skip creating the
+       credential if the alert did not have login info.
+
+2016-10-17  Matthew Mundell <matthew.mund...@greenbone.net>
+
        * src/manage_migrators.c (migrate_165_to_166): Neaten comments.
 
 2016-10-17  Matthew Mundell <matthew.mund...@greenbone.net>

Modified: trunk/openvas-manager/src/manage_migrators.c
===================================================================
--- trunk/openvas-manager/src/manage_migrators.c        2016-10-17 15:07:35 UTC 
(rev 26418)
+++ trunk/openvas-manager/src/manage_migrators.c        2016-10-17 15:09:05 UTC 
(rev 26419)
@@ -12135,6 +12135,10 @@
       owner = iterator_int64 (&alert_data, 4);
       method = iterator_int (&alert_data, 5);
 
+      /* Skip the alert if it is missing login info. */
+      if (name == NULL || password == NULL)
+        continue;
+
       quoted_name = sql_quote (name);
       quoted_login = sql_quote (login);
 
@@ -12288,6 +12292,10 @@
       owner = iterator_int64 (&alert_data, 4);
       method = iterator_int (&alert_data, 5);
 
+      /* Skip the alert if it is missing login info. */
+      if (name == NULL || password == NULL)
+        continue;
+
       quoted_name = sql_quote (name);
       quoted_login = sql_quote (login);
 

_______________________________________________
Openvas-commits mailing list
Openvas-commits@wald.intevation.org
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-commits

Reply via email to