about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard Nyberg <rnyberg@murmeldjur.se>2005-07-04 15:38:37 +0000
committerRichard Nyberg <rnyberg@murmeldjur.se>2005-07-04 15:38:37 +0000
commit36ea68a4b26a3d9e3777fb74a11c62860b2b8afe (patch)
treeb7c2e1c8f459a993fb0d6aeb1e5a33fbcb817a87
parentb5ee1dba08af321f5d593c72dc8e802639bb7e2f (diff)
downloadbtpd-36ea68a4b26a3d9e3777fb74a11c62860b2b8afe.tar.gz
btpd-36ea68a4b26a3d9e3777fb74a11c62860b2b8afe.zip
No need to check for EINTR.
-rw-r--r--btpd/net.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/btpd/net.c b/btpd/net.c
index e1296fa..4e15ae3 100644
--- a/btpd/net.c
+++ b/btpd/net.c
@@ -222,9 +222,7 @@ net_write(struct peer *p, unsigned long wmax)
 again:
     nwritten = writev(p->sd, iov, niov);
     if (nwritten < 0) {
-	if (errno == EINTR)
-	    goto again;
-	else if (errno == EAGAIN) {
+	if (errno == EAGAIN) {
 	    event_add(&p->out_ev, NULL);
 	    return 0;
 	} else {
@@ -435,7 +433,7 @@ net_read(struct peer *p, char *buf, size_t len)
 {
     ssize_t nread = read(p->sd, buf, len);
     if (nread < 0) {
-	if (errno == EINTR || errno == EAGAIN) {
+	if (errno == EAGAIN) {
 	    event_add(&p->in_ev, NULL);
 	    return 0;
 	} else {
@@ -968,7 +966,7 @@ net_connection_cb(int sd, short type, void *arg)
 
     nsd = accept(sd, NULL, NULL);
     if (nsd < 0) {
-	if (errno == EWOULDBLOCK || errno == ECONNABORTED || errno == EINTR)
+	if (errno == EWOULDBLOCK || errno == ECONNABORTED)
 	    return;
 	else
 	    btpd_err("accept4: %s\n", strerror(errno));