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 - gfs_controld: recv error checking


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=98ec6839ab8a2525081c43a40e696b357403aaf4
Commit:        98ec6839ab8a2525081c43a40e696b357403aaf4
Parent:        33ac2d9d4cca0e1fa7af829738c238969259a897
Author:        Steven Whitehouse <swhiteho@redhat.com>
AuthorDate:    Tue Nov 25 09:55:21 2008 -0600
Committer:     David Teigland <teigland@redhat.com>
CommitterDate: Tue Nov 25 09:55:21 2008 -0600

gfs_controld: recv error checking

in process_uevent wasn't looking at errno.

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

diff --git a/group/gfs_controld/main.c b/group/gfs_controld/main.c
index 09fb105..a2d8ed9 100644
--- a/group/gfs_controld/main.c
+++ b/group/gfs_controld/main.c
@@ -257,12 +257,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]