OSSP CVS Repository

ossp - Difference in ossp-pkg/lmtp2nntp/nntp.c versions 1.11 and 1.12
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/lmtp2nntp/nntp.c 1.11 -> 1.12

--- nntp.c       2001/08/23 07:52:25     1.11
+++ nntp.c       2001/08/23 08:10:12     1.12
@@ -327,7 +327,10 @@
     if (strncmp(line, "340", 3) != 0)
         return NNTP_ERR_POST;
 
-    if ((rc = nntp->io.write(nntp->wfd, msg->cpMsg, strlen(msg->cpMsg))) < 0) /*FIXME while() wrapper around write required */
+    do {
+        rc = nntp->io.write(nntp->wfd, msg->cpMsg, strlen(msg->cpMsg));
+    } while (rc == -1 && errno = EINTR);
+    if (rc == -1)
         return NNTP_ERR_SYSTEM;
 
     if ((rc = nntp_readline(nntp, line, sizeof(line))) != NNTP_OK)
@@ -401,7 +404,10 @@
     if (strncmp(line, "335", 3) != 0)
         return NNTP_ERR_POST;
 
-    if ((rc = nntp->io.write(nntp->wfd, msg->cpMsg, strlen(msg->cpMsg))) < 0) /*FIXME while() wrapper around write required */
+    do {
+        rc = nntp->io.write(nntp->wfd, msg->cpMsg, strlen(msg->cpMsg));
+    } while (rc == -1 && errno = EINTR);
+    if (rc == -1)
         return NNTP_ERR_SYSTEM;
 
     if ((rc = nntp_readline(nntp, line, sizeof(line))) != NNTP_OK)

CVSTrac 2.0.1