Skip to contentSkip to conversation

cluster/rgmanager/src clulib/msg_socket.c clul ...

Cluster-devel [email protected] 1 participant 1 message Nov 30, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Changes by: lhh at sourceware.org 2007-11-30 21:01:27

Modified files:
rgmanager/src/clulib: msg_socket.c vft.c rgmanager/src/daemons: depends.c reslist.c restree.c

Log message:
Merge from RHEL5 branch, pass 3

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/clulib/msg_socket.c.diff?cvsroot=cluster&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/clulib/vft.c.diff?cvsroot=cluster&r1=1.21&r2=1.22
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/depends.c.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/reslist.c.diff?cvsroot=cluster&r1=1.20&r2=1.21
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/restree.c.diff?cvsroot=cluster&r1=1.38&r2=1.39

rgmanager/src/clulib/msg_socket.c +1 -1
@@ -44,7 +44,7 @@
 
 	memset(&sun, 0, sizeof(sun));
 	sun.sun_family = PF_LOCAL;
-	snprintf(sun.sun_path, sizeof(sun.sun_path), RGMGR_SOCK);
+	snprintf(sun.sun_path, sizeof(sun.sun_path), "%s", RGMGR_SOCK);
 
 	sock = socket(PF_LOCAL, SOCK_STREAM, 0);
 	if (sock < 0) {
rgmanager/src/clulib/vft.c +9 -3
@@ -734,7 +734,7 @@
 	if (!fp)
 		return -1;
 
-#if defined(__sparc__) || defined(__sparc64__)
+#if defined(__sparc__) || defined(__hppa__) || defined(__sparc64__) || defined (__hppa64__)
 	rv = fscanf(fp,"%ld.%d %ld.%d\n", &tv->tv_sec, &tv->tv_usec,
 		    &junk.tv_sec, &junk.tv_usec);
 #else
@@ -1368,6 +1368,7 @@
 {
 	vf_msg_t *hdrp;
 	int ret;
+	key_node_t *kn;
 
 	if ((nbytes <= 0) || (nbytes < sizeof(generic_msg_hdr)) ||
 	    (msgp->gh_command != VF_MESSAGE))
@@ -1422,8 +1423,13 @@
 #endif
 		pthread_mutex_lock(&key_list_mutex);
 		vf_buffer_commit(msgp->gh_arg2);
-		ret = (vf_resolve_views(kn_find_trans(msgp->gh_arg2)) ?
-			VFR_COMMIT : VFR_OK);
+		kn = kn_find_trans(msgp->gh_arg2);
+		if (!kn) {
+			pthread_mutex_unlock(&key_list_mutex);
+			return VFR_OK;
+		}
+
+		ret = (vf_resolve_views(kn) ? VFR_COMMIT : VFR_OK);
 		pthread_mutex_unlock(&key_list_mutex);
 		return ret;
 
rgmanager/src/daemons/depends.c +2 -0
@@ -36,6 +36,8 @@
  */
 #include <string.h>
 #include <list.h>
+#include <time.h>
+#include <restart_counter.h>
 #include <clulog.h>
 #include <resgroup.h>
 #include <reslist.h>
rgmanager/src/daemons/reslist.c +0 -1
@@ -824,7 +824,6 @@
 	}
 
 	if (!found) {
-		//printf("No attributes found for %s\n", base);
 		destroy_resource(res);
 		return NULL;
 	}
rgmanager/src/daemons/restree.c +32 -42

114 lines not on this page · raw message