Skip to contentSkip to conversation

cluster/magma-plugins dumb/dumb.c gulm/gulm-lo ...

Cluster-devel [email protected] 1 participant 1 message Jun 16, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Branch: STABLE
Changes by: lhh at sourceware.org 2006-06-16 20:01:36

Modified files:
magma-plugins/dumb: dumb.c
magma-plugins/gulm: gulm-lock.c gulm.c
magma-plugins/sm: services.c sm.c

Log message:
Merge from RHEL4 branch - fix #193128, part 1

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/magma-plugins/dumb/dumb.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.2&r2=1.2.8.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/magma-plugins/gulm/gulm-lock.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.5.8.3&r2=1.5.8.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/magma-plugins/gulm/gulm.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.6.2.2.6.3&r2=1.6.2.2.6.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/magma-plugins/sm/services.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.4.2.1.6.3&r2=1.4.2.1.6.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/magma-plugins/sm/sm.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.9.2.3.6.4&r2=1.9.2.3.6.5

magma-plugins/dumb/Attic/dumb.c +7 -1
@@ -35,7 +35,7 @@
 #include <netinet/in.h>
 #include <assert.h>
 
-#define MODULE_DESCRIPTION "Dumb Plugin v1.1"
+#define MODULE_DESCRIPTION "Dumb Plugin v1.1.1"
 #define MODULE_AUTHOR      "Lon Hohberger"
 #define DUMB_LOCK_PATH	   "/tmp/magma-dumb"
 
@@ -158,6 +158,12 @@
 
 	//printf("DUMB: %s called\n", __FUNCTION__);
 
+	if ((flags & CLK_EX) == 0) {
+		/* NULL lock not supported */
+		errno = EINVAL;
+		return -1;
+	}
+
 	fdp = malloc(sizeof(int));
 	if (!fdp)
 		return -1;
magma-plugins/gulm/Attic/gulm-lock.c +2 -1
@@ -269,13 +269,14 @@
 
 	*lockpp = NULL;
 
-	if (flags & CLK_EX) {
+	if ((flags & CLK_EX) == CLK_EX) {
 		state = lg_lock_state_Exclusive;
 	} else if (flags & CLK_READ) {
 		state = lg_lock_state_Shared;
 	} else if (flags & CLK_WRITE) {
 		state = lg_lock_state_Exclusive;
 	} else {
+		/* NULL Locks not supported on GULM */
 		errno = EINVAL;
 		return -1;
 	}
magma-plugins/gulm/Attic/gulm.c +1 -1
@@ -34,7 +34,7 @@
 #include <sys/types.h>
 #include <linux/unistd.h>
 
-#define MODULE_DESCRIPTION "GuLM Plugin v1.0.4"
+#define MODULE_DESCRIPTION "GuLM Plugin v1.0.5"
 #define MODULE_AUTHOR      "Lon Hohberger"
 
 
magma-plugins/sm/Attic/services.c +0 -2
@@ -235,8 +235,6 @@
 	} while (ioctl(sockfd, SIOCCLUSTER_GETMEMBERS, &cman_nl) !=
 		 cman_nl.max_members);
 
-	/* Another biggie */
-	foo = malloc(cml_size(cman_nl.max_members));
 	assert(foo != NULL);
 	strncpy(foo->cml_groupname, groupname, sizeof(foo->cml_groupname));
 
magma-plugins/sm/Attic/sm.c +47 -34

139 lines not on this page · raw message