OSSP CVS Repository

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

Check-in Number: 1824
Date: 2002-Feb-07 13:53:45 (local)
2002-Feb-07 12:53:45 (UTC)
User:thl
Branch:
Comment: fix to calculate nns correctly
Tickets:
Inspections:
Files:
ossp-pkg/lmtp2nntp/lmtp2nntp_config.c      1.45 -> 1.46     2 inserted, 2 deleted

ossp-pkg/lmtp2nntp/lmtp2nntp_config.c 1.45 -> 1.46

--- lmtp2nntp_config.c   2002/02/07 09:01:04     1.45
+++ lmtp2nntp_config.c   2002/02/07 12:53:45     1.46
@@ -471,7 +471,7 @@
 
         if (ov->ndata >= 1) {
             if ((ctx->pns = (struct ns *)malloc(ov->ndata * sizeof(struct ns))) == NULL) throw(0,0,0);
-            for (i = 0; i < ov->ndata; i++) {
+            for (i = 0; i < ov->ndata;) {
                 cp = (ov->data.m)[i];
                 log2(ctx, DEBUG, "cp = (data.m)[%d] = \"%s\"", i, cp);
                 if (strrchr(cp, ':') == NULL)
@@ -494,7 +494,7 @@
                 ctx->pns[i].rc = NNTP_OK;
                 ctx->pns[i].l2 = ctx->l2;
                 free(cp);
-                ctx->nns = i;
+                ctx->nns = ++i;
             }
         }
     }

CVSTrac 2.0.1