OSSP CVS Repository

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

Check-in Number: 1751
Date: 2002-Jan-31 16:13:16 (local)
2002-Jan-31 15:13:16 (UTC)
User:thl
Branch:
Comment: moved --size option
Tickets:
Inspections:
Files:
ossp-pkg/lmtp2nntp/lmtp2nntp.pod      1.35 -> 1.36     1 inserted, 2 deleted
ossp-pkg/lmtp2nntp/lmtp2nntp_config.c      1.30 -> 1.31     17 inserted, 0 deleted
ossp-pkg/lmtp2nntp/lmtp2nntp_main.c      1.23 -> 1.24     0 inserted, 7 deleted

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

--- lmtp2nntp.pod        2002/01/09 13:51:59     1.35
+++ lmtp2nntp.pod        2002/01/31 15:13:16     1.36
@@ -209,8 +209,7 @@
 
 =item B<-s> I<size>
 
-Size limitation on message in bytes. Default is 8388608 (8M). Values below 64
-are considered unacceptable small.
+Size limitation on message in bytes. Default is 8388608 (8M).
 
 =item B<-t> I<name>=I<sec>[,I<name>=I<sec>[,...]
 


ossp-pkg/lmtp2nntp/lmtp2nntp_config.c 1.30 -> 1.31

--- lmtp2nntp_config.c   2002/01/31 15:09:25     1.30
+++ lmtp2nntp_config.c   2002/01/31 15:13:16     1.31
@@ -592,6 +592,23 @@
     }
     catch (ex)
         rethrow;
+
+    /* --size SINGLE */
+    try {
+        if (   (val_get(ctx->val, "option.size", &ov) != VAL_OK)
+            || (ov->ndata != 1)
+            || (ov->data.s == NULL)
+              ) throw(0,0,0);
+        log1(ctx, TRACE, "--size = \"%s\"", ov->data.s);
+
+        if ((ctx->option_maxmessagesize = atoi(ov->data.s)) <= 0) {
+            log1(ctx, ERROR, "option --size, number (%d) out of range", ctx->option_maxmessagesize);
+            throw(0,0,0);
+        }
+    }
+    catch (ex)
+        rethrow;
+
 CUS:
     return;
 }


ossp-pkg/lmtp2nntp/lmtp2nntp_main.c 1.23 -> 1.24

--- lmtp2nntp_main.c     2002/01/31 15:09:25     1.23
+++ lmtp2nntp_main.c     2002/01/31 15:13:16     1.24
@@ -450,13 +450,6 @@
     /* read in the arguments */
     while ((i = getopt(argc, argv, "C:DKP:Va:b:c:d:g:h:l:m:n:o:r:s:t:u:v")) != -1) {
         switch (i) {
-            case 's': /*POD [B<-s> I<size>] */
-                ctx->option_maxmessagesize = atoi(optarg);
-                if(ctx->option_maxmessagesize < 64) {
-                    fprintf(stderr, "%s:Error: maximum message size is unacceptable small.\n", ctx->progname);
-                    CU(ERR_EXECUTION);
-                }
-                break;
             case 't': /*POD [B<-t> I<name>=I<sec>[,I<name>=I<sec>[,...]] */
                 if (argz_create_sep(optarg, ',', &azTimeout, &asTimeout) != 0)
                     CU(ERR_EXECUTION);

CVSTrac 2.0.1