public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* RHEL4 - magma-plugins: Fix loops allowing 65539 to be passed up
@ 2008-09-17 19:07 Lon Hohberger
0 siblings, 0 replies; 2+ messages in thread
From: Lon Hohberger @ 2008-09-17 19:07 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=f59bac1cbb6a1b3812dbdf0637fdeee635aa1a8e
Commit: f59bac1cbb6a1b3812dbdf0637fdeee635aa1a8e
Parent: 0179f8e9edc98ace2e59cb432476e2d9dd89cfde
Author: Lon Hohberger <lhh@redhat.com>
AuthorDate: Thu Sep 11 12:53:01 2008 -0400
Committer: Lon Hohberger <lhh@redhat.com>
CommitterDate: Wed Sep 17 15:05:30 2008 -0400
magma-plugins: Fix loops allowing 65539 to be passed up
rhbz#294491 redux
(Corrected fix)
---
magma-plugins/sm/sm.c | 36 ++++++++++++++++++------------------
1 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/magma-plugins/sm/sm.c b/magma-plugins/sm/sm.c
index 6867b81..666bb4f 100644
--- a/magma-plugins/sm/sm.c
+++ b/magma-plugins/sm/sm.c
@@ -36,7 +36,7 @@
#include <sys/select.h>
#include <sys/stat.h>
-#define MODULE_DESCRIPTION "CMAN/SM Plugin v1.1.7.5"
+#define MODULE_DESCRIPTION "CMAN/SM Plugin v1.1.7.6"
#define MODULE_AUTHOR "Lon Hohberger"
#define DLM_LS_NAME "Magma"
@@ -578,14 +578,14 @@ _dlm_lock(sm_priv_t *p, int mode, struct dlm_lksb *lksb, int options,
if (ret < 0)
return -1;
- while ((ret = (wait_for_dlm_event(p->ls) < 0))) {
- /* If nothing much has happened, just
- wait a bit longer */
- if (lksb->sb_status == EINPROG)
- continue;
- errno = lksb->sb_status;
- return -1;
- }
+ while (lksb->sb_status == EINPROG) {
+ if (wait_for_dlm_event(p->ls) < 0) {
+ if (lksb->sb_status == EINPROG)
+ continue;
+ errno = lksb->sb_status;
+ return -1;
+ }
+ }
/* Got the lock ! */
return 0;
@@ -652,14 +652,14 @@ _dlm_unlock(sm_priv_t *p, struct dlm_lksb *lksb)
/* lksb->sb_status should be EINPROG at this point */
- while (wait_for_dlm_event(p->ls) < 0) {
- /* If nothing much has happened, just
- wait a bit longer */
- if (lksb->sb_status == EINPROG)
- continue;
- errno = lksb->sb_status;
- return -1;
- }
+ while (lksb->sb_status == EINPROG) {
+ if (wait_for_dlm_event(p->ls) < 0) {
+ if (lksb->sb_status == EINPROG)
+ continue;
+ errno = lksb->sb_status;
+ return -1;
+ }
+ }
return 0;
}
@@ -799,7 +799,7 @@ sm_lock(cluster_plugin_t *self,
the CLK_CONVERT flag, then assume it's a previous lksb with
a held lock. */
if ((flags & CLK_CONVERT) && *lockpp) {
- lksb = (struct lksb *)*lockpp;
+ lksb = (struct lksb *)(*lockpp);
options |= LKF_CONVERT;
} else {
lksb = malloc(sz);
^ permalink raw reply [flat|nested] 2+ messages in thread
* RHEL4 - magma-plugins: Fix loops allowing 65539 to be passed up
@ 2008-09-11 18:56 Lon Hohberger
0 siblings, 0 replies; 2+ messages in thread
From: Lon Hohberger @ 2008-09-11 18:56 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=84ad017e8091cda3e538ab439ec4938e640fe22d
Commit: 84ad017e8091cda3e538ab439ec4938e640fe22d
Parent: 651858b37a27ee735423103e65bc39121b5ece0a
Author: Lon Hohberger <lhh@redhat.com>
AuthorDate: Thu Sep 11 12:53:01 2008 -0400
Committer: Lon Hohberger <lhh@redhat.com>
CommitterDate: Thu Sep 11 12:53:55 2008 -0400
magma-plugins: Fix loops allowing 65539 to be passed up
rhbz#294491 redux
---
magma-plugins/sm/sm.c | 32 ++++++++++++++++----------------
1 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/magma-plugins/sm/sm.c b/magma-plugins/sm/sm.c
index 6867b81..caafac2 100644
--- a/magma-plugins/sm/sm.c
+++ b/magma-plugins/sm/sm.c
@@ -578,14 +578,14 @@ _dlm_lock(sm_priv_t *p, int mode, struct dlm_lksb *lksb, int options,
if (ret < 0)
return -1;
- while ((ret = (wait_for_dlm_event(p->ls) < 0))) {
- /* If nothing much has happened, just
- wait a bit longer */
- if (lksb->sb_status == EINPROG)
- continue;
- errno = lksb->sb_status;
- return -1;
- }
+ while (lksb.sb_status == EINPROG) {
+ if (wait_for_dlm_event(p->ls) < 0) {
+ if (lksb->sb_status == EINPROG)
+ continue;
+ errno = lksb->sb_status;
+ return -1;
+ }
+ }
/* Got the lock ! */
return 0;
@@ -652,14 +652,14 @@ _dlm_unlock(sm_priv_t *p, struct dlm_lksb *lksb)
/* lksb->sb_status should be EINPROG at this point */
- while (wait_for_dlm_event(p->ls) < 0) {
- /* If nothing much has happened, just
- wait a bit longer */
- if (lksb->sb_status == EINPROG)
- continue;
- errno = lksb->sb_status;
- return -1;
- }
+ while (lksb.sb_status == EINPROG) {
+ if (wait_for_dlm_event(p->ls) < 0) {
+ if (lksb->sb_status == EINPROG)
+ continue;
+ errno = lksb->sb_status;
+ return -1;
+ }
+ }
return 0;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-17 19:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-17 19:07 RHEL4 - magma-plugins: Fix loops allowing 65539 to be passed up Lon Hohberger
-- strict thread matches above, loose matches on Subject: below --
2008-09-11 18:56 Lon Hohberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).