From e0ec82cf5e4e9ca3070ed5a3ff51b1ff927fe7f4 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 13 Oct 1996 16:45:09 +0000 Subject: Add settable server-nonresponse timeout svn path=/trunk/; revision=325 --- options.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'options.c') diff --git a/options.c b/options.c index f74ff03d..f85ff2d1 100644 --- a/options.c +++ b/options.c @@ -30,18 +30,19 @@ #define LA_PROTOCOL 11 #define LA_PORT 12 #define LA_AUTHENTICATE 13 -#define LA_USERNAME 14 -#define LA_ALL 15 -#define LA_KILL 16 -#define LA_KEEP 17 -#define LA_FLUSH 18 -#define LA_NOREWRITE 19 -#define LA_REMOTEFILE 20 -#define LA_SMTPHOST 21 -#define LA_MDA 22 -#define LA_YYDEBUG 23 +#define LA_TIMEOUT 14 +#define LA_USERNAME 15 +#define LA_ALL 16 +#define LA_KILL 17 +#define LA_KEEP 18 +#define LA_FLUSH 19 +#define LA_NOREWRITE 20 +#define LA_REMOTEFILE 21 +#define LA_SMTPHOST 22 +#define LA_MDA 23 +#define LA_YYDEBUG 24 -static char *shortoptions = "?Vcsvd:qL:f:i:p:P:A:u:akKFnr:S:m:y"; +static char *shortoptions = "?Vcsvd:qL:f:i:p:P:A:t:u:akKFnr:S:m:y"; static struct option longoptions[] = { {"help", no_argument, (int *) 0, LA_HELP }, {"version", no_argument, (int *) 0, LA_VERSION }, @@ -58,6 +59,7 @@ static struct option longoptions[] = { {"proto", required_argument, (int *) 0, LA_PROTOCOL }, {"port", required_argument, (int *) 0, LA_PORT }, {"auth", required_argument, (int *) 0, LA_AUTHENTICATE}, + {"timeout", required_argument, (int *) 0, LA_TIMEOUT }, {"user", required_argument, (int *) 0, LA_USERNAME }, {"username", required_argument, (int *) 0, LA_USERNAME }, @@ -190,6 +192,9 @@ struct hostrec *queryctl; errflag++; } break; + case 't': + queryctl->timeout = atoi(optarg); + break; case 'u': case LA_USERNAME: strncpy(queryctl->remotename,optarg,sizeof(queryctl->remotename)-1); @@ -260,6 +265,7 @@ struct hostrec *queryctl; fputs(" -p, --protocol specify pop2, pop3, imap, apop, rpop, kpop\n", stderr); fputs(" -P, --port TCP/IP service port to connect to\n",stderr); fputs(" -A, --auth authentication type (password or kerberos)\n",stderr); + fputs(" -t, --timeout server nonresponse timeout\n",stderr); fputs(" -u, --username specify users's login on server\n", stderr); fputs(" -a, --all retrieve old and new messages\n", stderr); -- cgit v1.2.3