This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cluster: master - dlm_controld: recv error checking


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=0ec734d325cf822c0da05c12809f009fcae247a3
Commit:        0ec734d325cf822c0da05c12809f009fcae247a3
Parent:        98ec6839ab8a2525081c43a40e696b357403aaf4
Author:        David Teigland <teigland@redhat.com>
AuthorDate:    Tue Nov 25 10:53:51 2008 -0600
Committer:     David Teigland <teigland@redhat.com>
CommitterDate: Tue Nov 25 10:53:51 2008 -0600

dlm_controld: recv error checking

in process_uevent wasn't looking at errno.

Signed-off-by: David Teigland <teigland@redhat.com>
---
 group/dlm_controld/main.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/group/dlm_controld/main.c b/group/dlm_controld/main.c
index 4af249c..afc8022 100644
--- a/group/dlm_controld/main.c
+++ b/group/dlm_controld/main.c
@@ -304,12 +304,11 @@ static void process_uevent(int ci)
 
  retry_recv:
 	rv = recv(client[ci].fd, &buf, sizeof(buf), 0);
-	if (rv == -1 && rv == EINTR)
-		goto retry_recv;
-	if (rv == -1 && rv == EAGAIN)
-		return;
 	if (rv < 0) {
-		log_error("uevent recv error %d errno %d", rv, errno);
+		if (errno == EINTR)
+			goto retry_recv;
+		if (errno != EAGAIN)
+			log_error("uevent recv error %d errno %d", rv, errno);
 		return;
 	}
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]