OSSP CVS Repository

ossp - Check-in [918]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 918
Date: 2001-Sep-10 14:48:14 (local)
2001-Sep-10 12:48:14 (UTC)
User:thl
Branch:
Comment: POST really should be called DELIVERY as we support posting and feeding
Tickets:
Inspections:
Files:
ossp-pkg/lmtp2nntp/nntp.c      1.22 -> 1.23     9 inserted, 9 deleted
ossp-pkg/lmtp2nntp/nntp.h      1.9 -> 1.10     1 inserted, 1 deleted

ossp-pkg/lmtp2nntp/nntp.c 1.22 -> 1.23

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


ossp-pkg/lmtp2nntp/nntp.h 1.9 -> 1.10

--- nntp.h       2001/09/07 15:02:08     1.9
+++ nntp.h       2001/09/10 12:48:14     1.10
@@ -51,7 +51,7 @@
     NNTP_ERR_SYSTEM,
     NNTP_ERR_ARG,
     NNTP_ERR_OVERFLOW,
-    NNTP_ERR_POST,
+    NNTP_ERR_DELIVERY,
     NNTP_ERR_INIT,
     NNTP_ERR_UNKNOWN
 } nntp_rc_t;

CVSTrac 2.0.1