Mailing List Archive

NessusClient/nessus context.h,1.13,1.14 context.c,1.12,1.13
Update of /usr/local/cvs/NessusClient/nessus
In directory raccoon.nessus.org:/tmp/cvs-serv2298/nessus

Modified Files:
context.h context.c
Log Message:
Rename the struct context member report_plugin_cache_loaded to
plugin_cache_loaded and use it for scope contexts as well.


Index: context.h
===================================================================
RCS file: /usr/local/cvs/NessusClient/nessus/context.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- context.h 27 Apr 2006 20:16:47 -0000 1.13
+++ context.h 28 Apr 2006 17:42:33 -0000 1.14
@@ -74,7 +74,7 @@
* so we avoid loading them. This flag indicates whether the plugin
* information has been loaded.
*/
- int report_plugin_cache_loaded;
+ int plugin_cache_loaded;
#endif
};


Index: context.c
===================================================================
RCS file: /usr/local/cvs/NessusClient/nessus/context.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- context.c 28 Apr 2006 10:46:37 -0000 1.12
+++ context.c 28 Apr 2006 17:42:33 -0000 1.13
@@ -61,7 +61,7 @@
(*context)->pbar = NULL;
(*context)->plugin_tree_store = NULL;
(*context)->plugin_tree_model = NULL;
- (*context)->report_plugin_cache_loaded = 0;
+ (*context)->plugin_cache_loaded = 0;
#endif
}

@@ -582,29 +582,25 @@


/* Load the plugin cache of the context if it has one, the context
- * doesn't have plugin information yet and caching of plugins hasn't
- * been switched off.
+ * doesn't have plugin information yet and the user actually wants to
+ * load plugin information for the given type of context.
*/
void
context_load_plugin_cache(struct context *context)
{
- if (context->type == CONTEXT_REPORT && !context->report_plugin_cache_loaded
- && context->plugins == NULL
- && prefs_get_int(Global, "reports_use_plugin_cache"))
+ if (context->plugins == NULL && !context->plugin_cache_loaded
+ &&
+ ((context->type == CONTEXT_REPORT
+ && prefs_get_int(Global, "reports_use_plugin_cache"))
+ || (context->type == CONTEXT_SCOPE
+ && prefs_get_int(Global, "scopes_load_plugin_cache_immediately"))))
{
/* FIXME: plugin_cache_read may fail. for the time being we can
* ignore this as the most likely reason is that there simply isn't
* any plugin cache stored with the report, but it would be nicer to
* produce a message about it. */
plugin_cache_read(context);
- context->report_plugin_cache_loaded = 1;
- fill_plugin_prefs(context);
- context_reset_plugin_tree(context);
- }
- else if (context->type == CONTEXT_SCOPE && context->plugins == NULL
- && prefs_get_int(Global, "scopes_load_plugin_cache_immediately"))
- {
- plugin_cache_read(context);
+ context->plugin_cache_loaded = 1;
fill_plugin_prefs(context);
context_reset_plugin_tree(context);
}

_______________________________________________
Nessus-cvs mailing list
Nessus-cvs@list.nessus.org
http://mail.nessus.org/mailman/listinfo/nessus-cvs