case 'm':
case 'o':
- if (!*argrest) {}
- else badarg = TRUE;
+ if (*argrest) badarg = TRUE;
break;
/* -oP <name>: set pid file path for daemon
case 'r':
case 's':
- if (!*argrest)
- {
- int *tp = (*argrest == 'r')?
- &arg_receive_timeout : &arg_smtp_receive_timeout;
- if (argrest[1] == 0)
- {
- if (i+1 < argc) *tp= readconf_readtime(argv[++i], 0, FALSE);
- }
- else *tp = readconf_readtime(argrest + 1, 0, FALSE);
- if (*tp < 0)
- exim_fail("exim: bad time value %s: abandoned\n", argv[i]);
- }
- else badarg = TRUE;
+ {
+ int * tp = argrest[-1] == 'r'
+ ? &arg_receive_timeout : &arg_smtp_receive_timeout;
+ if (*argrest)
+ *tp = readconf_readtime(argrest, 0, FALSE);
+ else if (i+1 < argc)
+ *tp = readconf_readtime(argv[++i], 0, FALSE);
+
+ if (*tp < 0)
+ exim_fail("exim: bad time value %s: abandoned\n", argv[i]);
+ }
break;
/* -oX <list>: Override local_interfaces and/or default daemon ports */
case 'X':
- if (!*argrest)
- override_local_interfaces = argv[++i];
- else badarg = TRUE;
+ if (*argrest) badarg = TRUE;
+ else override_local_interfaces = argv[++i];
break;
/* Unknown -o argument */
{
int last_ch = '\n';
+/*XXX we do a gettimeofday before checking for every received char,
+which is hardly clever. The function-indirection doesn't help, but
+an additional function to check for nonempty read buffer would help.
+See stdin_getc() / smtp_getc() / tls_getc() / bdat_getc(). */
+
for ( ;
log_close_chk(), (ch = (receive_getc)(GETC_BUFFER_UNLIMITED)) != EOF;
last_ch = ch)