--- lmtp2nntp.c 2001/10/12 12:03:19 1.87
+++ lmtp2nntp.c 2001/10/12 12:26:26 1.88
@@ -157,7 +157,7 @@
int option_daemon;
int option_aclc;
struct acl option_acl[MAXACLS];
- int option_maxchilds;
+ int option_childsmax;
int active_childs;
l2_stream_t *l2;
sa_addr_t *saaAltio;
@@ -207,11 +207,12 @@
*/
fprintf(stderr,
"USAGE: %s "
+ "[-C childsmax] "
"[-D] "
"[-K] "
"[-P pidfile] "
"[-a addr/mask[,addr/mask[,...]] "
- "[-b addr[:port]|-|path] "
+ "[-b addr[:port]|-|path[:perms]] "
"[-c addr[:port]] "
"[-d addr[:port][,addr[:port], ...]] "
"[-g groupmode] "
@@ -438,7 +439,7 @@
ctx->option_killflag = FALSE;
ctx->option_uid = getuid();
ctx->option_daemon = FALSE;
- ctx->option_maxchilds = 10;
+ ctx->option_childsmax = 10;
ctx->active_childs = 0;
ctx->l2 = NULL;
ctx->saaAltio = NULL;
@@ -483,10 +484,10 @@
/* read in the arguments */
while ((i = getopt(argc, argv, "C:DKP:a:b:c:d:g:l:m:n:o:s:t:u:v")) != -1) {
switch (i) {
- case 'C': /*POD [B<-C> I<numchilds>] */
- ctx->option_maxchilds = atoi(optarg);
- if (ctx->option_maxchilds <= 0) {
- fprintf(stderr, "%s:Error: Invalid number of maximum children (%d) to option -C\n", ctx->progname, ctx->option_maxchilds);
+ case 'C': /*POD [B<-C> I<childsmax>] */
+ ctx->option_childsmax = atoi(optarg);
+ if (ctx->option_childsmax <= 0) {
+ fprintf(stderr, "%s:Error: Invalid number (%d) to option -C\n", ctx->progname, ctx->option_childsmax);
CU(ERR_EXECUTION);
}
break;
@@ -535,7 +536,7 @@
}
free(azACL);
break;
- case 'b': /*POD [B<-b> I<addr>[I<:port>]|C<->|I<path>] */
+ case 'b': /*POD [B<-b> I<addr>[I<:port>]|C<->|I<path>[:perms]] */
if (strcmp(optarg, "-") != 0) {
if ((rc = sa_create(&ctx->saAltio)) != SA_OK) {
fprintf(stderr, "%s:Error: Creating TCP socket failed for \"%s\": %s\n",
@@ -1081,8 +1082,8 @@
sa_timeout(ctx->saAltio, SA_TIMEOUT_READ, ctx->option_timeout_lmtp_read, 0);
sa_timeout(ctx->saAltio, SA_TIMEOUT_WRITE, ctx->option_timeout_lmtp_write, 0);
while (1) {
- while (ctx->active_childs >= ctx->option_maxchilds) {
- log1(ctx, ERROR, "maximum number of childs (%d) reached - waiting (1s)", ctx->option_maxchilds);
+ while (ctx->active_childs >= ctx->option_childsmax) {
+ log1(ctx, ERROR, "maximum number of childs (%d) reached - waiting (1s)", ctx->option_childsmax);
sleep(1);
}
|