[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1917-g625851a

Volker Lendecke vlendec at samba.org
Sat May 30 07:50:05 GMT 2009


The branch, master has been updated
       via  625851a50f74024f5918e0b348147457c2cc42ea (commit)
      from  df167ee7712a9c92fcb6ca1541dc4d1e5d93da02 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 625851a50f74024f5918e0b348147457c2cc42ea
Author: Volker Lendecke <vl at samba.org>
Date:   Sat May 30 09:49:17 2009 +0200

    Handle EINTR in async_sock.c

-----------------------------------------------------------------------

Summary of changes:
 lib/async_req/async_sock.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/async_req/async_sock.c b/lib/async_req/async_sock.c
index 09eec10..d88edb1 100644
--- a/lib/async_req/async_sock.c
+++ b/lib/async_req/async_sock.c
@@ -81,6 +81,10 @@ static void async_send_handler(struct tevent_context *ev,
 		tevent_req_data(req, struct async_send_state);
 
 	state->sent = send(state->fd, state->buf, state->len, state->flags);
+	if ((state->sent == -1) && (errno == EINTR)) {
+		/* retry */
+		return;
+	}
 	if (state->sent == -1) {
 		tevent_req_error(req, errno);
 		return;
@@ -148,6 +152,10 @@ static void async_recv_handler(struct tevent_context *ev,
 
 	state->received = recv(state->fd, state->buf, state->len,
 			       state->flags);
+	if ((state->received == -1) && (errno == EINTR)) {
+		/* retry */
+		return;
+	}
 	if (state->received == -1) {
 		tevent_req_error(req, errno);
 		return;
@@ -427,6 +435,10 @@ static void writev_handler(struct tevent_context *ev, struct tevent_fd *fde,
 	}
 
 	written = writev(state->fd, state->iov, state->count);
+	if ((written == -1) && (errno = EINTR)) {
+		/* retry */
+		return;
+	}
 	if (written == -1) {
 		tevent_req_error(req, errno);
 		return;
@@ -534,6 +546,10 @@ static void read_packet_handler(struct tevent_context *ev,
 
 	nread = recv(state->fd, state->buf+state->nread, total-state->nread,
 		     0);
+	if ((nread == -1) && (errno == EINTR)) {
+		/* retry */
+		return;
+	}
 	if (nread == -1) {
 		tevent_req_error(req, errno);
 		return;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list