From 29f400c3857d5c257dff46875ed2bb5249fc6bb0 Mon Sep 17 00:00:00 2001 From: Matt Mundell Date: Thu, 19 Sep 2019 20:20:51 +0200 Subject: [PATCH] Only pass filter to osp_get_nvts if there's a version --- src/manage_sql_nvts.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/manage_sql_nvts.c b/src/manage_sql_nvts.c index 4560a78cc..8e18339be 100644 --- a/src/manage_sql_nvts.c +++ b/src/manage_sql_nvts.c @@ -1457,7 +1457,10 @@ manage_update_nvt_cache_osp (const gchar *update_socket) return -1; } - get_vts_opts.filter = g_strdup_printf ("modification_time>%s", db_feed_version); + if (db_feed_version) + get_vts_opts.filter = g_strdup_printf ("modification_time>%s", db_feed_version); + else + get_vts_opts.filter = NULL; if (osp_get_vts_ext (connection, get_vts_opts, &vts)) { g_warning ("%s: failed to get VTs", __FUNCTION__);