Author: mattm Date: 2017-08-09 22:04:44 +0200 (Wed, 09 Aug 2017) New Revision: 29331
Modified: trunk/gvm/ChangeLog trunk/gvm/src/manage_sql_secinfo.c Log: * src/manage_sql_secinfo.c (sync_secinfo, sync_cert, sync_scap): Remove excess logging that is output during the periodic sync check even when no sync is required. Modified: trunk/gvm/ChangeLog =================================================================== --- trunk/gvm/ChangeLog 2017-08-09 19:29:10 UTC (rev 29330) +++ trunk/gvm/ChangeLog 2017-08-09 20:04:44 UTC (rev 29331) @@ -1,5 +1,11 @@ 2017-08-09 Matthew Mundell <matthew.mund...@greenbone.net> + * src/manage_sql_secinfo.c (sync_secinfo, sync_cert, sync_scap): Remove + excess logging that is output during the periodic sync check even when no + sync is required. + +2017-08-09 Matthew Mundell <matthew.mund...@greenbone.net> + * src/gvmd.c (serve_and_schedule): Check last_schedule_time before the second manage_schedule call, to prevent manage_schedule from running every time pselect exits. Also compare with >=, because the pselect Modified: trunk/gvm/src/manage_sql_secinfo.c =================================================================== --- trunk/gvm/src/manage_sql_secinfo.c 2017-08-09 19:29:10 UTC (rev 29330) +++ trunk/gvm/src/manage_sql_secinfo.c 2017-08-09 20:04:44 UTC (rev 29331) @@ -3605,8 +3605,6 @@ int pid, lockfile; gchar *lockfile_name; - g_debug ("%s", __FUNCTION__); - /* Fork a child to sync the db, so that the parent can return to the main * loop. */ @@ -3651,8 +3649,6 @@ exit (EXIT_SUCCESS); } - g_debug ("%s: locked", __FUNCTION__); - /* Init. */ reinit_manage_process (); @@ -3667,7 +3663,6 @@ default: /* Parent. Continue to next task. */ - g_debug ("%s: %i forked %i", __FUNCTION__, getpid (), pid); return; } @@ -3676,13 +3671,9 @@ if (update (lockfile) == 0) { - g_info ("%s: Checking for alerts", __FUNCTION__); - check_alerts (); } - g_debug ("%s: cleaning up", __FUNCTION__); - /* Close the lock file. */ if (close (lockfile)) @@ -3913,8 +3904,6 @@ if (manage_cert_db_exists ()) { - g_debug ("%s: database exists", __FUNCTION__); - if (check_cert_db_version ()) return -1; } @@ -3928,8 +3917,6 @@ } } - g_debug ("%s: get last_cert_update", __FUNCTION__); - last_cert_update = 0; if (manage_cert_loaded ()) last_cert_update = sql_int ("SELECT coalesce ((SELECT value FROM cert.meta" @@ -3948,19 +3935,12 @@ last_cert_update = 0; } - g_debug ("%s: last_cert_update: %i", __FUNCTION__, last_cert_update); - last_feed_update = manage_feed_timestamp ("cert"); if (last_feed_update == -1) return -1; - g_debug ("%s: last_feed_update: %i", __FUNCTION__, last_feed_update); - if (last_cert_update >= last_feed_update) - { - g_debug ("%s: skipping, CERT db newer than feed", __FUNCTION__); - return -1; - } + return -1; g_debug ("%s: sync", __FUNCTION__); @@ -4242,8 +4222,6 @@ if (manage_scap_db_exists ()) { - g_debug ("%s: database exists", __FUNCTION__); - if (check_scap_db_version ()) return -1; } @@ -4258,8 +4236,6 @@ } } - g_debug ("%s: get last_scap_update", __FUNCTION__); - last_scap_update = -1; if (manage_scap_loaded ()) last_scap_update = sql_int ("SELECT coalesce ((SELECT value FROM scap.meta" @@ -4278,19 +4254,12 @@ last_scap_update = 0; } - g_debug ("%s: last_scap_update: %i", __FUNCTION__, last_scap_update); - last_feed_update = manage_feed_timestamp ("scap"); if (last_feed_update == -1) return -1; - g_debug ("%s: last_feed_update: %i", __FUNCTION__, last_feed_update); - if (last_scap_update >= last_feed_update) - { - g_debug ("%s: skipping, SCAP db newer than feed", __FUNCTION__); - return -1; - } + return -1; g_debug ("%s: sync", __FUNCTION__); _______________________________________________ Openvas-commits mailing list Openvas-commits@wald.intevation.org https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-commits