 -	if (len < 0) {
 -		log_error("read error on cluster socket: %m");
 -		return 0;
--	}
 +	return cman_dispatch(c_handle, CMAN_DISPATCH_ALL);
-+}
+ 	}
  
 -	/* EOF - we have left the cluster */
 -	if (len == 0)

-	do {
-		len = sendmsg(cluster_sock, &msg, 0);
-		if (len < 0 && errno != EAGAIN)
-			log_error(errtext);
-
-	} while (len == -1 && errno == EAGAIN);
-	return len;
+	DEBUGLOG("sending message to node %d\n", nodeid);
+	if (cman_send_data(c_handle, buf, msglen, 0, CLUSTER_PORT_CLVMD, nodeid) <= 0)
+	{
+		log_error(errtext);
+	}
+	return msglen;
 }

===================================================================
RCS file: /cvs/lvm2/LVM2/daemons/clvmd/clvmd.c,v
retrieving revision 1.25
diff -w -u -p -r1.25 clvmd.c
--- daemons/clvmd/clvmd.c	9 Aug 2005 10:39:57 -0000	1.25
+++ daemons/clvmd/clvmd.c	24 Feb 2006 13:05:59 -0000
@@ -508,6 +508,9 @@ static void main_loop(int local_sock, in
 		struct timeval tv = { cmd_timeout, 0 };
 		int quorate = clops->is_quorate();
