--- 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)
|