OSSP CVS Repository

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

Check-in Number: 1118
Date: 2001-Oct-09 12:34:10 (local)
2001-Oct-09 10:34:10 (UTC)
User:rse
Branch:
Comment: post-bugfixes to reflect recent changes
Tickets:
Inspections:
Files:
ossp-pkg/lmtp2nntp/lmtp2nntp.c      1.73 -> 1.74     7 inserted, 9 deleted
ossp-pkg/lmtp2nntp/test.sh      1.3 -> 1.4     15 inserted, 14 deleted

ossp-pkg/lmtp2nntp/lmtp2nntp.c 1.73 -> 1.74

--- lmtp2nntp.c  2001/10/09 10:24:41     1.73
+++ lmtp2nntp.c  2001/10/09 10:34:10     1.74
@@ -131,7 +131,6 @@
     char           *option_operationmodefakestatus;
     char           *option_operationmodefakedsn;
     int             option_maxmessagesize;
-    int             option_waittime;
     int             option_timeout_lmtp_accept;
     int             option_timeout_lmtp_read;
     int             option_timeout_lmtp_write;
@@ -380,7 +379,6 @@
     ctx->option_operationmodefakestatus = "553";   /* Requested action not taken: mailbox name not allowed */
     ctx->option_operationmodefakedsn    = "5.7.1"; /* Delivery not authorized, message refused */
     ctx->option_maxmessagesize = 8 * 1024 * 1024;
-    ctx->option_waittime = -1;
     ctx->option_timeout_lmtp_accept = 0;
     ctx->option_timeout_lmtp_read = 10;
     ctx->option_timeout_lmtp_write = 10;
@@ -1048,10 +1046,10 @@
             }
         }
 
-        if (bOk && (ctx->option_waittime > 0)) {
-            log1(ctx, DEBUG, "timeout configured through waittime=%d", ctx->option_waittime);
-            sa_timeout(ctx->ns[i].sa, SA_TIMEOUT_ALL, ctx->option_waittime, 0);
-            }
+        sa_timeout(ctx->ns[i].sa, SA_TIMEOUT_ALL, 0, 0);
+        sa_timeout(ctx->ns[i].sa, SA_TIMEOUT_CONNECT, ctx->option_timeout_nntp_connect, 0);
+        sa_timeout(ctx->ns[i].sa, SA_TIMEOUT_READ,    ctx->option_timeout_nntp_read,    0);
+        sa_timeout(ctx->ns[i].sa, SA_TIMEOUT_WRITE,   ctx->option_timeout_nntp_read,    0);
 
         if (bOk) {
             log0(ctx, DEBUG, "connect");
@@ -1073,9 +1071,9 @@
             }
         }
 
-        if (bOk && ctx->option_waittime >= 0) {
-            log1(ctx, DEBUG, "nntp_timeout with %d", ctx->option_waittime);
-            nntp_timeout(ctx->ns[i].nntp, ctx->option_waittime);
+        if (bOk && ctx->option_timeout_nntp_connect >= 0) {
+            log1(ctx, DEBUG, "nntp_timeout with %d", ctx->option_timeout_nntp_connect);
+            nntp_timeout(ctx->ns[i].nntp, ctx->option_timeout_nntp_connect);
         }
 
         if (bOk) {


ossp-pkg/lmtp2nntp/test.sh 1.3 -> 1.4

--- test.sh      2001/10/08 10:28:42     1.3
+++ test.sh      2001/10/09 10:34:10     1.4
@@ -16,10 +16,10 @@
 Message-Id: <200108141251.f7ECpmn74812@dev.de.cw.net>
 From: Thomas Lotterer <Thomas.Lotterer@example.com>
 Received: from cw.example.com (cw.example.com [10.1.1.32])
-    by gateway.example.com (8.9.2/8.9.2/$Revision: 1.3 $) with SMTP id NAA08840
+    by gateway.example.com (8.9.2/8.9.2/$Revision: 1.4 $) with SMTP id NAA08840
     for <thomas.lotterer@gateway.example.com>; Mon, 2 Apr 2001 13:20:25 +0200 (MET DST)
 Received: from history (history.example.org [195.143.102.41])
-    by cw.example.com (8.11.0/8.11.0/$Revision: 1.3 $) with ESMTP id f32BKPb12235
+    by cw.example.com (8.11.0/8.11.0/$Revision: 1.4 $) with ESMTP id f32BKPb12235
     for <thomas.lotterer@example.com>; Mon, 2 Apr 2001 13:20:25 +0200
 Received: from example.org (littlemua.example.org [195.143.103.160])
         by history (8.8.8/8.8.8) with ESMTP id LAA12678;
@@ -101,13 +101,14 @@
 
 echon "checking whether -? usage option works ... "
 # expected typical output: USAGE: ./lmtp2nntp
-# lmtp2nntp [-b bindaddr[:port]] [-d deliverymode] [-g groupmode] [-h
-# host[:port][,host[:port], ...]] [-m mailfrom] [-n nodename] [-s size] [-l
-# level[:logfile]] [-v] [-w waittime] newsgroup [newsgroup ...]
+# [-D] [-K] [-P pidfile] [-a addr/mask[,addr/mask[,...]] [-b
+# -|path|addr[:port]] [-c addr[:port]] [-d addr[:port][,addr[:port], ...]] [-g
+# groupmode] [-l level[:logfile]] [-m mailfrom] [-n nodename] [-o operationmode]
+# [-s size] [-t name=sec[,name=sec[,...]] [-v] newsgroup [newsgroup ...] 
 prolog
 newmsg
 ./lmtp2nntp -? >${STDOUT} 2>${STDERR}
-RC=`cat ${STDERR} | egrep -- '-a.*-b.*-d.*-g.*-h.*-l.*-m.*-n.*-s.*-v.*-w.*newsgroup' | wc -l`
+RC=`cat ${STDERR} | egrep -- '-D.*-K.*-P.*-a.*-b.*-d.*-g.*-l.*-m.*-n.*-o.*-s.*-t.*-v.*newsgroup' | wc -l`
 if [ ${RC} -ne 1 -o -s ${STDOUT} ]; then
     echo "NO (got ${RC})"
     exit 1;
@@ -117,7 +118,7 @@
 echon "checking whether a valid fake posting succeeds ... "
 prolog
 newmsg
-./lmtp2nntp <${STDIN} -b ${LOCAL} -d 250/2.0.0 -g arg -h ${HOST} -l ${LOG}:${FILE} -m "${MFILT}" -n ${NODE} -s 1000 -w 1 ${GROUP} >${STDOUT} 2>${STDERR} ; RC=$
+./lmtp2nntp <${STDIN} -c ${LOCAL} -o 250/2.0.0 -g arg -d ${HOST} -l ${LOG}:${FILE} -m "${MFILT}" -n ${NODE} -s 1000 -t nntp:connect=1 ${GROUP} >${STDOUT} 2>${STDERR} ; RC=$
 RC="";
 if [ 1 -eq `egrep <${STDOUT} '^220[- ]LMTP Service ready'       | wc -l` ]; then RC="${RC}init "; fi
 if [ 1 -eq `egrep <${STDOUT} '^250[- ].*pleased to meet you'    | wc -l` ]; then RC="${RC}LHLO "; fi
@@ -135,7 +136,7 @@
 echon "checking whether -m option blocks invalid sender ... "
 prolog
 newmsg
-( MFILT=".*@is.invalid" ; ./lmtp2nntp <${STDIN} -b ${LOCAL} -d 250/2.0.0 -g arg -h ${HOST} -l ${LOG}:${FILE} -m "${MFILT}" -n ${NODE} -s 1000 -w 1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$?
+( MFILT=".*@is.invalid" ; ./lmtp2nntp <${STDIN} -c ${LOCAL} -o 250/2.0.0 -g arg -d ${HOST} -l ${LOG}:${FILE} -m "${MFILT}" -n ${NODE} -s 1000 -t nntp:connect=1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$?
 RC="";
 if [ 1 -eq `egrep <${STDOUT} '^220[- ]LMTP Service ready'       | wc -l` ]; then RC="${RC}init "; fi
 if [ 1 -eq `egrep <${STDOUT} '^250[- ].+pleased to meet you'    | wc -l` ]; then RC="${RC}LHLO "; fi
@@ -153,7 +154,7 @@
 echon "checking whether -s option rejects article with invalid size ... "
 prolog
 newmsg
-./lmtp2nntp <${STDIN} -b ${LOCAL} -d 250/2.0.0 -g arg -h ${HOST} -l ${LOG}:${FILE} -m "${MFILT}" -n ${NODE} -s 100  -w 1 ${GROUP} >${STDOUT} 2>${STDERR} ; RC=$?
+./lmtp2nntp <${STDIN} -c ${LOCAL} -o 250/2.0.0 -g arg -d ${HOST} -l ${LOG}:${FILE} -m "${MFILT}" -n ${NODE} -s 100 -t nntp:connect=1 ${GROUP} >${STDOUT} 2>${STDERR} ; RC=$?
 RC="";
 if [ 1 -eq `egrep <${STDOUT} '^220[- ]LMTP Service ready'       | wc -l` ]; then RC="${RC}init "; fi
 if [ 1 -eq `egrep <${STDOUT} '^250[- ].*pleased to meet you'    | wc -l` ]; then RC="${RC}LHLO "; fi
@@ -168,10 +169,10 @@
 fi
 echo "yes"
 
-echon "checking whether -b option fails on invalid local host address ... "
+echon "checking whether -c option fails on invalid local host address ... "
 prolog
 newmsg
-( LOCAL="10.255.255.255" ; ./lmtp2nntp <${STDIN} -b ${LOCAL} -d 250/2.0.0 -g arg -h ${HOST} -l ${LOG}:${FILE} -m "${MFILT}" -n ${NODE} -s 1000 -w 1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$?
+( LOCAL="10.255.255.255" ; ./lmtp2nntp <${STDIN} -c ${LOCAL} -o 250/2.0.0 -g arg -d ${HOST} -l ${LOG}:${FILE} -m "${MFILT}" -n ${NODE} -s 1000 -t nntp:connect=1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$?
 RC="";
 if [ 1 -eq `egrep <${STDOUT} '^220[- ]LMTP Service ready'       | wc -l` ]; then RC="${RC}init "; fi
 if [ 1 -eq `egrep <${FILE}   'error.+binding'                   | wc -l` ]; then RC="${RC}bind "; fi
@@ -184,7 +185,7 @@
 echon "checking whether -g envelope option blocks invalid group ... "
 prolog
 newmsg
-( GROUP="foo.*" ; ./lmtp2nntp <${STDIN} -b ${LOCAL} -d 250/2.0.0 -g envelope -h ${HOST} -l ${LOG}:${FILE} -m "${MFILT}" -n ${NODE} -s 1000 -w 1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$?
+( GROUP="foo.*" ; ./lmtp2nntp <${STDIN} -c ${LOCAL} -o 250/2.0.0 -g envelope -d ${HOST} -l ${LOG}:${FILE} -m "${MFILT}" -n ${NODE} -s 1000 -t nntp:connect=1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$?
 RC="";
 if [ 1 -eq `egrep <${STDOUT} '^220[- ]LMTP Service ready'       | wc -l` ]; then RC="${RC}init "; fi
 if [ 1 -eq `egrep <${STDOUT} '^250[- ].*pleased to meet you'    | wc -l` ]; then RC="${RC}LHLO "; fi
@@ -200,10 +201,10 @@
 fi
 echo "yes"
 
-echon "checking whether -h option times out for invalid host ... "
+echon "checking whether -d option times out for invalid host ... "
 prolog
 newmsg
-( HOST="10.255.255.255" ; ./lmtp2nntp <${STDIN} -b ${LOCAL} -d 250/2.0.0 -g arg -h ${HOST} -l ${LOG}:${FILE} -m "${MFILT}" -n ${NODE} -s 1000 -w 1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$?
+( HOST="10.255.255.255" ; ./lmtp2nntp <${STDIN} -c ${LOCAL} -o 250/2.0.0 -g arg -d ${HOST} -l ${LOG}:${FILE} -m "${MFILT}" -n ${NODE} -s 1000 -t nntp:connect=1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$?
 RC="";
 if [ 1 -eq `egrep <${STDOUT} '^220[- ]LMTP Service ready'       | wc -l` ]; then RC="${RC}init "; fi
 if [ 1 -eq `egrep <${FILE}   'warning.+connect.+failed'         | wc -l` ]; then RC="${RC}conn "; fi

CVSTrac 2.0.1