From b6959ce427fee4ee99499116bf94a2ead84bc1d3 Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Tue, 1 Feb 2005 20:40:07 +0000 Subject: [PATCH] fix defect 131 - member element not set in cluster membership service (Logical change 1.126) git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@444 fd59a12c-fef9-0310-b244-a6a79926bd2f --- exec/clm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/exec/clm.c b/exec/clm.c index 7820ed76..b4aba243 100644 --- a/exec/clm.c +++ b/exec/clm.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2004 MontaVista Software, Inc. + * Copyright (c) 2002-2005 MontaVista Software, Inc. * * All rights reserved. * @@ -314,6 +314,7 @@ static void libraryNotificationJoin (SaClmNodeIdT node) * Generate notification element */ clusterNotification.clusterChanges = SA_CLM_NODE_JOINED; + clusterNotification.clusterNode.member = 1; for (i = 0; i < clusterNodeEntries; i++) { if (node == clusterNodes[i].nodeId) { memcpy (&clusterNotification.clusterNode, &clusterNodes[i], @@ -340,6 +341,7 @@ static void libraryNotificationLeave (SaClmNodeIdT *nodes, int nodes_entries) &clusterNodes[i], sizeof (SaClmClusterNodeT)); clusterNotification[notifyEntries].clusterChanges = SA_CLM_NODE_LEFT; + clusterNotification[notifyEntries].clusterNode.member = 0; notifyEntries += 1; break; } @@ -372,6 +374,7 @@ static int clmNodeJoinSend (void) struct req_exec_clm_nodejoin req_exec_clm_nodejoin; struct iovec req_exec_clm_iovec; int result; + req_exec_clm_nodejoin.header.size = sizeof (struct req_exec_clm_nodejoin); req_exec_clm_nodejoin.header.id = MESSAGE_REQ_EXEC_CLM_NODEJOIN; // TODO dont use memcpy, use iovecs !!