[Openais] [PATCH 1/3] NOTIFYD: fix retrieving the application's parent name.

Angus Salkeld asalkeld at redhat.com
Mon Mar 28 02:26:29 PDT 2011


Signed-off-by: Angus Salkeld <asalkeld at redhat.com>
---
 tools/corosync-notifyd.c |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/tools/corosync-notifyd.c b/tools/corosync-notifyd.c
index 7af573c..4a58189 100644
--- a/tools/corosync-notifyd.c
+++ b/tools/corosync-notifyd.c
@@ -275,26 +275,18 @@ _cs_confdb_object_created(confdb_handle_t handle,
 	char parent_name[CS_MAX_NAME_LENGTH];
 	size_t len = 0;
 	char obj_name[CS_MAX_NAME_LENGTH];
-	hdb_handle_t real_parent_object_handle;
 	cs_error_t rc = CS_OK;
 
 	memcpy(obj_name, name_pt, name_len);
 	obj_name[name_len] = '\0';
 
-	rc = confdb_object_parent_get (handle,
-		parent_object_handle, &real_parent_object_handle);
+	rc = confdb_object_name_get (handle,
+		object_handle, parent_name, &len);
+	parent_name[len] = '\0';
 	if (rc != CS_OK) {
-		/* this error is normally from our own cfg connection
-		 * which is short lived.
-		 */
 		return;
 	}
 
-	rc = confdb_object_name_get (handle,
-		real_parent_object_handle, parent_name, &len);
-	parent_name[len] = '\0';
-	assert(rc == CS_OK);
-
 	if (strcmp(parent_name, "connections") == 0) {
 		_cs_application_connection_event(obj_name, "connected");
 	}
-- 
1.7.4



More information about the Openais mailing list