Skip to content

Commit

Permalink
Only pass filter to osp_get_nvts if there's a version
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmundell committed Sep 19, 2019
1 parent c07e154 commit 29f400c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/manage_sql_nvts.c
Original file line number Diff line number Diff line change
Expand Up @@ -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__);
Expand Down

0 comments on commit 29f400c

Please sign in to comment.