[Openvas-commits] r5442 - in trunk/openvas-client: . openvas/prefs_dialog

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Oct 8 14:27:44 CEST 2009


Author: mattm
Date: 2009-10-08 14:27:43 +0200 (Thu, 08 Oct 2009)
New Revision: 5442

Modified:
   trunk/openvas-client/ChangeLog
   trunk/openvas-client/openvas/prefs_dialog/prefs_scope_tree.c
Log:
	* openvas/prefs_dialog/prefs_scope_tree.c
	(scopetree_new_with_parent/scopetree_add_new_with_parent) [USE_OMP]:
	Note error in g_file_get_contents fail handling.  Check omp_modify_task
	return.

Modified: trunk/openvas-client/ChangeLog
===================================================================
--- trunk/openvas-client/ChangeLog	2009-10-08 12:21:16 UTC (rev 5441)
+++ trunk/openvas-client/ChangeLog	2009-10-08 12:27:43 UTC (rev 5442)
@@ -1,5 +1,12 @@
 2009-10-08  Matthew Mundell <matthew.mundell at intevation.de>
 
+	* openvas/prefs_dialog/prefs_scope_tree.c
+	(scopetree_new_with_parent/scopetree_add_new_with_parent) [USE_OMP]:
+	Note error in g_file_get_contents fail handling.  Check omp_modify_task
+	return.
+
+2009-10-08  Matthew Mundell <matthew.mundell at intevation.de>
+
 	* openvas/openvas-client.c [USE_OMP] (refresh_server): Remove
 	context_save_recurse.
 

Modified: trunk/openvas-client/openvas/prefs_dialog/prefs_scope_tree.c
===================================================================
--- trunk/openvas-client/openvas/prefs_dialog/prefs_scope_tree.c	2009-10-08 12:21:16 UTC (rev 5441)
+++ trunk/openvas-client/openvas/prefs_dialog/prefs_scope_tree.c	2009-10-08 12:27:43 UTC (rev 5442)
@@ -415,17 +415,26 @@
           g_file_get_contents (rcfile, &rc, &rc_len, &error);
           if (error)
             {
-              // FIX note error
+              free (id);
+              show_error (_("%s: Failed to get scope RC file: %s"),
+                          __FUNCTION__,
+                          error->message);
               g_error_free (error);
               openvas_server_close (server->socket, server->session);
               server->socket = 0;
+              return NULL;
+            }
+
+          if (omp_modify_task (&server->session, id, rc, NULL, NULL))
+            {
               free (id);
-              show_error (_("%s: Failed to get scope RC file"), __FUNCTION__);
+              g_free (rc);
+              show_error (_("%s: Failed to set RC on task on manager"),
+                          __FUNCTION__);
+              openvas_server_close (server->socket, server->session);
+              server->socket = 0;
               return NULL;
             }
-
-          // FIX check error
-          omp_modify_task (&server->session, id, rc, NULL, NULL);
           g_free (rc);
 
           openvas_server_close (server->socket, server->session);



More information about the Openvas-commits mailing list