[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openvas-cvs
Subject:    [Openvas-commits] r21720 - in trunk/openvas-manager: . src
From:       scm-commit () wald ! intevation ! org
Date:       2015-02-26 11:23:08
Message-ID: 20150226112309.547E09A213DC () wald ! intevation ! org
[Download RAW message or body]

Author: mattm
Date: 2015-02-26 12:23:08 +0100 (Thu, 26 Feb 2015)
New Revision: 21720

Modified:
   trunk/openvas-manager/ChangeLog
   trunk/openvas-manager/src/omp.c
Log:
	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_INFO reset the
	parser properly after find errors and improve the message of the NVT
	find error.

Modified: trunk/openvas-manager/ChangeLog
===================================================================
--- trunk/openvas-manager/ChangeLog	2015-02-26 10:48:13 UTC (rev 21719)
+++ trunk/openvas-manager/ChangeLog	2015-02-26 11:23:08 UTC (rev 21720)
@@ -1,3 +1,9 @@
+2015-02-26  Matthew Mundell <matthew.mundell@greenbone.net>
+
+	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_INFO reset the
+	parser properly after find errors and improve the message of the NVT
+	find error.
+
 2015-02-25  Timo Pollmeier <timo.pollmeier@greenbone.net>
 
 	* src/manage_sql.c (where_levels_auto): Correct order in which the SQL

Modified: trunk/openvas-manager/src/omp.c
===================================================================
--- trunk/openvas-manager/src/omp.c	2015-02-26 10:48:13 UTC (rev 21719)
+++ trunk/openvas-manager/src/omp.c	2015-02-26 11:23:08 UTC (rev 21720)
@@ -13002,8 +13002,11 @@
                                                  write_to_client_data))
                     {
                       error_send_to_client (error);
+                      return;
                     }
-                  return;
+                  get_info_data_reset (get_info_data);
+                  set_client_state (CLIENT_AUTHENTIC);
+                  break;
                 }
 
               user_filter = setting_filter (name);
@@ -13062,14 +13065,22 @@
                 }
               else
                 {
-                  if (send_find_error_to_client ("get_info", "name",
-                                                 get_info_data->name,
+                  if (send_find_error_to_client ("get_info",
+                                                 get_info_data->name
+                                                  ? "name"
+                                                  : "ID",
+                                                 get_info_data->name
+                                                  ? get_info_data->name
+                                                  : get_info_data->get.id,
                                                  write_to_client,
                                                  write_to_client_data))
                     {
                       error_send_to_client (error);
+                      return;
                     }
-                  return;
+                  get_info_data_reset (get_info_data);
+                  set_client_state (CLIENT_AUTHENTIC);
+                  break;
                 }
             }
           else if (g_strcmp0 ("ovaldef", get_info_data->type) == 0)

_______________________________________________
Openvas-commits mailing list
Openvas-commits@wald.intevation.org
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-commits
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic