
renaud at nessus
Dec 23, 2006, 6:33 AM
Post #1 of 1
(623 views)
Permalink
|
|
NessusClient/nessus/prefs_dialog prefs_scope_tree.c, 1.10.2.2, 1.10.2.3
|
|
Update of /usr/local/cvs/NessusClient/nessus/prefs_dialog In directory raccoon.nessus.org:/tmp/cvs-serv4505 Modified Files: Tag: release-1-0 prefs_scope_tree.c Log Message: avoid the creation of (null).cnt Index: prefs_scope_tree.c =================================================================== RCS file: /usr/local/cvs/NessusClient/nessus/prefs_dialog/prefs_scope_tree.c,v retrieving revision 1.10.2.2 retrieving revision 1.10.2.3 diff -u -d -r1.10.2.2 -r1.10.2.3 --- prefs_scope_tree.c 4 Nov 2006 23:22:37 -0000 1.10.2.2 +++ prefs_scope_tree.c 23 Dec 2006 14:33:55 -0000 1.10.2.3 @@ -565,7 +565,11 @@ * each .nbe file on startup */ snprintf(cached_counters, sizeof(cached_counters), "%s.cnt", fname); - fp = fopen(cached_counters, "r"); + if ( fname != NULL ) + fp = fopen(cached_counters, "r"); + else + fp = NULL; + if ( fp == NULL ) { hosts = backend_convert(be); @@ -573,13 +577,17 @@ w = number_of_warnings(hosts); n = number_of_notes(hosts); if(hosts) arg_free_all(hosts); - fp = fopen(cached_counters, "w"); + if ( fname != NULL ) + fp = fopen(cached_counters, "w"); + else + fp = NULL; + if ( fp != NULL ) { fprintf(fp, "%d %d %d\n", h, w, n); fclose(fp); } - else perror("open "); + else if ( fname != NULL ) perror("open "); } else { _______________________________________________ Nessus-cvs mailing list Nessus-cvs [at] list http://mail.nessus.org/mailman/listinfo/nessus-cvs
|