OSSP CVS Repository

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

ossp-pkg/lmtp2nntp/lmtp2nntp_main.c 1.31 -> 1.32

--- lmtp2nntp_main.c     2002/01/31 16:04:51     1.31
+++ lmtp2nntp_main.c     2002/02/04 13:52:15     1.32
@@ -334,26 +334,30 @@
         CU(ERR_EXECUTION);
     }
 
-    /* create application context */
+    /* create application context. fields are initialized to values that allow
+     * detection of dynamic allocated resources which must be freed up for
+     * graceful cleanup. These values are not necessarily useful application
+     * defaults. Those defaults must be configured in lmtp2nntp_option.c
+     * through option_register() calls */
     if ((ctx = (lmtp2nntp_t *)malloc(sizeof(lmtp2nntp_t))) == NULL)
         CU(ERR_EXECUTION);
     ctx->ctx.vp = ctx;
     ctx->val = NULL;
     ctx->progname = NULL;
-    ctx->option_childsmax = 10;
-    ctx->option_groupmode = GROUPMODE_ARG;
-    ctx->option_operationmode = OPERATIONMODE_FAKE;
-    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_childsmax = 0;
+    ctx->option_groupmode = GROUPMODE_UNDEF;
+    ctx->option_operationmode = OPERATIONMODE_UNDEF;
+    ctx->option_operationmodefakestatus = NULL;
+    ctx->option_operationmodefakedsn    = NULL;
+    ctx->option_maxmessagesize = 0;
     ctx->azHeaderValuePairs = NULL;
     ctx->asHeaderValuePairs = 0;
-    ctx->option_timeout_lmtp_accept = 0;
-    ctx->option_timeout_lmtp_read = 10;
-    ctx->option_timeout_lmtp_write = 10;
-    ctx->option_timeout_nntp_connect = 360;
-    ctx->option_timeout_nntp_read = 60;
-    ctx->option_timeout_nntp_write = 60;
+    ctx->option_timeout_lmtp_accept  = 0;
+    ctx->option_timeout_lmtp_read    = 0;
+    ctx->option_timeout_lmtp_write   = 0;
+    ctx->option_timeout_nntp_connect = 0;
+    ctx->option_timeout_nntp_read    = 0;
+    ctx->option_timeout_nntp_write   = 0;
     ctx->option_mailfrom = NULL;
     ctx->option_restrictheader = NULL;
     ctx->option_pidfile = NULL;

CVSTrac 2.0.1