OSSP CVS Repository

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

Check-in Number: 1756
Date: 2002-Jan-31 16:59:12 (local)
2002-Jan-31 15:59:12 (UTC)
User:thl
Branch:
Comment: moved/added --newsgroup option
Tickets:
Inspections:
Files:
ossp-pkg/lmtp2nntp/lmtp2nntp_config.c      1.35 -> 1.36     22 inserted, 0 deleted
ossp-pkg/lmtp2nntp/lmtp2nntp_main.c      1.27 -> 1.28     0 inserted, 4 deleted

ossp-pkg/lmtp2nntp/lmtp2nntp_config.c 1.35 -> 1.36

--- lmtp2nntp_config.c   2002/01/31 15:54:53     1.35
+++ lmtp2nntp_config.c   2002/01/31 15:59:12     1.36
@@ -789,6 +789,28 @@
     }
     catch (ex)
         rethrow;
+
+    /* --newsgroup MULTI */
+    try {
+        char *cp;
+        int i;
+
+        if (   (val_get(ctx->val, "option.newsgroup", &ov) != VAL_OK)
+            || ((ov->ndata >= 1) && (ov->data.m == NULL))
+              ) throw(0,0,0);
+        log1(ctx, DEBUG, "ov->ndata = %d", ov->ndata);
+        for (i = 0; i < ov->ndata; i++)
+            log2(ctx, TRACE, "--newsgroup[%d] = \"%s\"", i, (ov->data.m)[i]);
+
+        for (i = 0; i < ov->ndata; i++) {
+            cp = (ov->data.m)[i];
+            log2(ctx, DEBUG, "cp = (data.m)[%d] = \"%s\"", i, cp);
+            argz_add(&ctx->azGroupargs, &ctx->asGroupargs, cp);
+        }
+    }
+    catch (ex)
+        rethrow;
+
 CUS:
     return;
 }


ossp-pkg/lmtp2nntp/lmtp2nntp_main.c 1.27 -> 1.28

--- lmtp2nntp_main.c     2002/01/31 15:53:43     1.27
+++ lmtp2nntp_main.c     2002/01/31 15:59:12     1.28
@@ -448,10 +448,6 @@
                 CU(ERR_EXECUTION);
         }
     }
-    /*POD I<newsgroup> [I<newsgroup> ...] */
-    for (i = optind; i < argc; i++) {
-        argz_add(&ctx->azGroupargs, &ctx->asGroupargs, argv[i]);
-    }
 
     /* if no positive ACL exists (option -a) add a wildcard match-all for IPv4 and IPv6 */
     bOk = FALSE;

CVSTrac 2.0.1