* [Cluster-devel] cluster/magma-plugins/sm sm.c
@ 2006-09-07 18:41 lhh
0 siblings, 0 replies; 3+ messages in thread
From: lhh @ 2006-09-07 18:41 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: lhh at sourceware.org 2006-09-07 18:41:24
Modified files:
magma-plugins/sm: sm.c
Log message:
Fix 146924 - segfault if cman does not give out a membership list.
NOTE: Only for RHEL4 branch; depends on udev.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/magma-plugins/sm/sm.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.9.2.9&r2=1.9.2.10
--- cluster/magma-plugins/sm/Attic/sm.c 2006/06/16 19:54:57 1.9.2.9
+++ cluster/magma-plugins/sm/Attic/sm.c 2006/09/07 18:41:23 1.9.2.10
@@ -34,8 +34,9 @@
#include <signal.h>
#include <sys/types.h>
#include <sys/select.h>
+#include <sys/stat.h>
-#define MODULE_DESCRIPTION "CMAN/SM Plugin v1.1.7.1"
+#define MODULE_DESCRIPTION "CMAN/SM Plugin v1.1.7.2"
#define MODULE_AUTHOR "Lon Hohberger"
#define DLM_LS_NAME "Magma"
@@ -368,17 +369,23 @@
sm_open(cluster_plugin_t *self)
{
sm_priv_t *p;
+ struct stat st;
assert(self);
p = (sm_priv_t *)self->cp_private.p_data;
assert(p);
+ /* Check for existince of dlm control file so we don't
+ hang in dlm_acquire_lockspace */
+ if (stat("/dev/dlm-control", &st) < 0)
+ return -1;
+
if (p->sockfd >= 0)
close(p->sockfd);
p->sockfd = socket(AF_CLUSTER, SOCK_DGRAM, CLPROTO_CLIENT);
if (p->sockfd < 0)
- return -errno;
+ return -1;
return p->sockfd;
}
@@ -601,7 +608,7 @@
/* Work around race: Someone was closing lockspace as
we were trying to open it. Retry. */
if (errno == ENOENT)
- continue;
+ continue;
fprintf(stderr, "failed acquiring lockspace: %s\n",
strerror(errno));
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Cluster-devel] cluster/magma-plugins/sm sm.c
@ 2007-04-23 18:25 lhh
0 siblings, 0 replies; 3+ messages in thread
From: lhh @ 2007-04-23 18:25 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: lhh at sourceware.org 2007-04-23 19:24:58
Modified files:
magma-plugins/sm: sm.c
Log message:
Ancillary fix to bug #223907
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/magma-plugins/sm/sm.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.9.2.11&r2=1.9.2.12
--- cluster/magma-plugins/sm/Attic/sm.c 2007/01/03 21:09:09 1.9.2.11
+++ cluster/magma-plugins/sm/Attic/sm.c 2007/04/23 18:24:58 1.9.2.12
@@ -36,7 +36,7 @@
#include <sys/select.h>
#include <sys/stat.h>
-#define MODULE_DESCRIPTION "CMAN/SM Plugin v1.1.7.3"
+#define MODULE_DESCRIPTION "CMAN/SM Plugin v1.1.7.4"
#define MODULE_AUTHOR "Lon Hohberger"
#define DLM_LS_NAME "Magma"
@@ -377,7 +377,8 @@
/* Check for existince of dlm control file so we don't
hang in dlm_acquire_lockspace */
- if (stat("/dev/dlm-control", &st) < 0)
+ if (stat("/dev/misc/dlm-control", &st) < 0 &&
+ stat("/dev/dlm-control", &st) < 0)
return -1;
if (p->sockfd >= 0)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Cluster-devel] cluster/magma-plugins/sm sm.c
@ 2007-04-23 18:24 lhh
0 siblings, 0 replies; 3+ messages in thread
From: lhh @ 2007-04-23 18:24 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL45
Changes by: lhh at sourceware.org 2007-04-23 19:24:44
Modified files:
magma-plugins/sm: sm.c
Log message:
Ancillary fix to bug #223907
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/magma-plugins/sm/sm.c.diff?cvsroot=cluster&only_with_tag=RHEL45&r1=1.9.2.11&r2=1.9.2.11.2.1
--- cluster/magma-plugins/sm/Attic/sm.c 2007/01/03 21:09:09 1.9.2.11
+++ cluster/magma-plugins/sm/Attic/sm.c 2007/04/23 18:24:44 1.9.2.11.2.1
@@ -36,7 +36,7 @@
#include <sys/select.h>
#include <sys/stat.h>
-#define MODULE_DESCRIPTION "CMAN/SM Plugin v1.1.7.3"
+#define MODULE_DESCRIPTION "CMAN/SM Plugin v1.1.7.4"
#define MODULE_AUTHOR "Lon Hohberger"
#define DLM_LS_NAME "Magma"
@@ -377,7 +377,8 @@
/* Check for existince of dlm control file so we don't
hang in dlm_acquire_lockspace */
- if (stat("/dev/dlm-control", &st) < 0)
+ if (stat("/dev/misc/dlm-control", &st) < 0 &&
+ stat("/dev/dlm-control", &st) < 0)
return -1;
if (p->sockfd >= 0)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-04-23 18:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-07 18:41 [Cluster-devel] cluster/magma-plugins/sm sm.c lhh
2007-04-23 18:24 lhh
2007-04-23 18:25 lhh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.