--- nntp.c 2001/09/10 10:15:26 1.22
+++ nntp.c 2001/09/10 12:48:14 1.23
@@ -288,11 +288,11 @@
* expected and we treat this as an error.
*/
if (strncmp(line, "201", 3) == 0)
- return NNTP_ERR_POST;
+ return NNTP_ERR_DELIVERY;
if ( strncmp(line, "200", 3) != 0
&& strncmp(line, "5" , 1) != 0
)
- return NNTP_ERR_POST;
+ return NNTP_ERR_DELIVERY;
/* check if this server already knows that artice
* > STAT <message-id>
@@ -309,7 +309,7 @@
if (strncmp(line, "223", 3) == 0)
return NNTP_OK;
if (strncmp(line, "430", 3) != 0)
- return NNTP_ERR_POST;
+ return NNTP_ERR_DELIVERY;
/* post the article
* > POST
@@ -347,7 +347,7 @@
if ((rc = nntp_readline(nntp, line, sizeof(line))) != NNTP_OK)
return rc;
if (strncmp(line, "340", 3) != 0)
- return NNTP_ERR_POST;
+ return NNTP_ERR_DELIVERY;
do {
rc = nntp->io.write(nntp->io.ctx, nntp->wfd, msg->cpMsg, strlen(msg->cpMsg));
@@ -370,7 +370,7 @@
return NNTP_OK;
}
- return NNTP_ERR_POST;
+ return NNTP_ERR_DELIVERY;
#if 0
/* check if this server accepts at least one of the newsgroups
@@ -420,10 +420,10 @@
if ( (strncmp(line, "437", 3) == 0)
|| (strncmp(line, "480", 3) == 0))
- return NNTP_ERR_POST;
+ return NNTP_ERR_DELIVERY;
if (strncmp(line, "335", 3) != 0)
- return NNTP_ERR_POST;
+ return NNTP_ERR_DELIVERY;
do {
rc = nntp->io.write(nntp->io.ctx, nntp->wfd, msg->cpMsg, strlen(msg->cpMsg));
@@ -440,7 +440,7 @@
if (strncmp(line, "436", 3) == 0)
return NNTP_DEFER;
- return NNTP_ERR_POST;
+ return NNTP_ERR_DELIVERY;
}
char *nntp_error(nntp_rc_t rc)
@@ -454,7 +454,7 @@
else if (rc == NNTP_ERR_SYSTEM ) str = "NNTP: see errno";
else if (rc == NNTP_ERR_ARG ) str = "NNTP: invalid argument";
else if (rc == NNTP_ERR_OVERFLOW) str = "NNTP: buffer overflow";
- else if (rc == NNTP_ERR_POST ) str = "NNTP: cannot post message";
+ else if (rc == NNTP_ERR_DELIVERY) str = "NNTP: cannot deliver message";
else if (rc == NNTP_ERR_INIT ) str = "NNTP: initialization failed";
else if (rc == NNTP_ERR_UNKNOWN ) str = "NNTP: unknown error";
return str;
|