Mailing List Archive

NessusClient/nessus context.h, 1.15, 1.16 context.c, 1.15, 1.16 comm.c, 1.22, 1.23
Update of /usr/local/cvs/NessusClient/nessus
In directory raccoon.nessus.org:/tmp/cvs-serv79733/nessus

Modified Files:
context.h context.c comm.c
Log Message:
Make sure that the plugin preferences widgets are recreated when the
plugin information has changed while connecting to the server.


Index: context.h
===================================================================
RCS file: /usr/local/cvs/NessusClient/nessus/context.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- context.h 18 May 2006 14:42:03 -0000 1.15
+++ context.h 3 Jul 2006 14:43:21 -0000 1.16
@@ -84,6 +84,7 @@
void context_init(struct context**, struct context*);
struct context *context_by_type(struct context*, context_type);
void context_reset_plugin_tree(struct context*);
+void context_force_plugin_prefs_redraw(struct context *context);
void context_add_plugin(struct context*, struct nessus_plugin*);
void context_load_plugin_cache(struct context *context);
void context_set_plugins_md5sum(struct context *context, const char *md5sum);

Index: context.c
===================================================================
RCS file: /usr/local/cvs/NessusClient/nessus/context.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- context.c 18 May 2006 14:42:03 -0000 1.15
+++ context.c 3 Jul 2006 14:43:21 -0000 1.16
@@ -100,6 +100,31 @@
#endif
}

+/* Force a redraw of the plugin prefs widgets. The redraw is not
+ * directly here. It will happen as soon as prefs_plugins_prefs_redraw
+ * is called.
+ * When compiling without USE_GTK, this function does nothing.
+ */
+void
+context_force_plugin_prefs_redraw(struct context *context)
+{
+#ifdef USE_GTK
+ if (context->plugin_prefs_widget != NULL) {
+ g_object_unref(context->plugin_prefs_widget);
+ context->plugin_prefs_widget = NULL;
+ }
+ if (context->plugin_prefs_cred_swindow != NULL) {
+ g_object_unref(context->plugin_prefs_cred_swindow);
+ context->plugin_prefs_cred_swindow = NULL;
+ }
+ if (context->plugin_prefs_cred_vbox != NULL) {
+ g_object_unref(context->plugin_prefs_cred_vbox);
+ context->plugin_prefs_cred_vbox = NULL;
+ }
+#endif
+}
+
+
/* Reset the plugin information of the context */
void
context_reset_plugins(struct context *context)

Index: comm.c
===================================================================
RCS file: /usr/local/cvs/NessusClient/nessus/comm.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- comm.c 30 Jun 2006 14:03:31 -0000 1.22
+++ comm.c 3 Jul 2006 14:43:21 -0000 1.23
@@ -1273,6 +1273,7 @@
plugin_cache_write(context, server_md5sum);
network_printf(context->socket, "CLIENT <|> GO ON <|> CLIENT\n");
context_reset_plugin_tree(context);
+ context_force_plugin_prefs_redraw(context);
}

fail:

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