OSSP CVS Repository

ossp - Difference in ossp-pkg/lmtp2nntp/lmtp2nntp.c versions 1.35 and 1.36
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

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

--- lmtp2nntp.c  2001/08/30 08:35:44     1.35
+++ lmtp2nntp.c  2001/08/30 09:01:59     1.36
@@ -53,7 +53,7 @@
 #define ERR_DELIVERY -2
 
 #define STDSTRLEN 128
-#define MAXNEWSSERVICES 3
+#define MAXNEWSSERVICES 16
 
 extern void lmtp_debug_dumplmtp(lmtp_t *lmtp);
 
@@ -130,8 +130,8 @@
      */
     fprintf(stderr, 
             "USAGE: %s "
-            "[-V] [-d deliverymode] [-g groupmode] [-h host[:port]] "
-            "[-m maxmessagesize] [-t tracefile] [-v] newsgroup [newsgroup ...]"
+            "[-V] [-d deliverymode] [-g groupmode] [-h host[:port][,host[:port], ...]] "
+            "[-m maxmessagesize] [-n hostname] [-t tracefile] [-v] newsgroup [newsgroup ...]"
             "\n",
             command);
     return;
@@ -205,7 +205,7 @@
      */
 
     /* read in the arguments */
-    while ((i = getopt(argc, argv, "Vd:g:h:m:t:v")) != -1) {
+    while ((i = getopt(argc, argv, "Vd:g:h:m:n:t:v")) != -1) {
         switch (i) {
             case 'V': /*POD [B<-V>] (version)*/
                 fprintf(stdout, "%s\n", lmtp2nntp_version.v_gnu);
@@ -316,6 +316,13 @@
                         exit(ERR_EXECUTION);
                     }
                 break;
+            case 'n': /*POD [B<-n> I<hostname>] */
+                if (strlen(optarg) > sizeof(ctx->uname.nodename)-1) {
+                        fprintf(stderr, "%s:Error: nodename \"%s\" to long to option -n.\n", progname, optarg);
+                        exit(ERR_EXECUTION);
+                }
+                strcpy(ctx->uname.nodename, optarg);
+                break;
             case 't': /*POD [B<-t> I<tracefile>] */
                 ctx->option_tracing = TRUE;
                 trace_read (-1, optarg, 0);

CVSTrac 2.0.1