"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "util/nvticache.c" between
gvm-libs-11.0.0.tar.gz and gvm-libs-11.0.1.tar.gz

About: GVM Libraries for the Greenbone Vulnerability Management (GVM-10) framework (derived from the former openvas-libraries).

nvticache.c  (gvm-libs-11.0.0):nvticache.c  (gvm-libs-11.0.1)
skipping to change at line 192 skipping to change at line 192
nvticache_save () nvticache_save ()
{ {
char *feed_version, *old_version; char *feed_version, *old_version;
if (cache_kb && !cache_saved) if (cache_kb && !cache_saved)
{ {
kb_save (cache_kb); kb_save (cache_kb);
cache_saved = 1; cache_saved = 1;
} }
old_version = nvticache_feed_version (); old_version = nvticache_feed_version ();
feed_version = nvt_feed_version (); feed_version = nvt_feed_version ();
if (g_strcmp0 (old_version, feed_version)) if (feed_version && g_strcmp0 (old_version, feed_version))
{ {
kb_item_set_str (cache_kb, NVTICACHE_STR, feed_version, 0); kb_item_set_str (cache_kb, NVTICACHE_STR, feed_version, 0);
g_message ("Updated NVT cache from version %s to %s", old_version, g_message ("Updated NVT cache from version %s to %s", old_version,
feed_version); feed_version);
} }
g_free (old_version); g_free (old_version);
g_free (feed_version); g_free (feed_version);
} }
/** /**
skipping to change at line 584 skipping to change at line 584
size_t size_t
nvticache_count () nvticache_count ()
{ {
assert (cache_kb); assert (cache_kb);
return kb_item_count (cache_kb, "nvt:*"); return kb_item_count (cache_kb, "nvt:*");
} }
/** /**
* @brief Delete NVT from the cache. * @brief Delete NVT from the cache.
*
* @param[in] oid OID to match. * @param[in] oid OID to match.
*/ */
void void
nvticache_delete (const char *oid) nvticache_delete (const char *oid)
{ {
char pattern[4096]; char pattern[4096];
char *filename; char *filename;
assert (cache_kb); assert (cache_kb);
assert (oid); assert (oid);
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)