From e644052b38ac03a5683f6ba48554dfb4cfe78c9c Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 13 Jan 1997 21:24:27 +0000 Subject: Gather all server data into a restorable structure. svn path=/trunk/; revision=754 --- options.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'options.c') diff --git a/options.c b/options.c index 7cfb0cda..b474666d 100644 --- a/options.c +++ b/options.c @@ -172,18 +172,18 @@ struct query *ctl; /* option record to be initialized */ case LA_PROTOCOL: /* XXX -- should probably use a table lookup here */ if (strcasecmp(optarg,"pop2") == 0) - ctl->protocol = P_POP2; + ctl->server.protocol = P_POP2; else if (strcasecmp(optarg,"pop3") == 0) - ctl->protocol = P_POP3; + ctl->server.protocol = P_POP3; else if (strcasecmp(optarg,"imap") == 0) - ctl->protocol = P_IMAP; + ctl->server.protocol = P_IMAP; else if (strcasecmp(optarg,"apop") == 0) - ctl->protocol = P_APOP; + ctl->server.protocol = P_APOP; else if (strcasecmp(optarg,"kpop") == 0) { - ctl->protocol = P_POP3; - ctl->port = KPOP_PORT; - ctl->authenticate = A_KERBEROS; + ctl->server.protocol = P_POP3; + ctl->server.port = KPOP_PORT; + ctl->server.authenticate = A_KERBEROS; } else { fprintf(stderr,"Invalid protocol `%s' specified.\n", optarg); @@ -192,14 +192,14 @@ struct query *ctl; /* option record to be initialized */ break; case 'P': case LA_PORT: - ctl->port = atoi(optarg); + ctl->server.port = atoi(optarg); break; case 'A': case LA_AUTHENTICATE: if (strcmp(optarg, "password") == 0) - ctl->authenticate = A_PASSWORD; + ctl->server.authenticate = A_PASSWORD; else if (strcmp(optarg, "kerberos") == 0) - ctl->authenticate = A_KERBEROS; + ctl->server.authenticate = A_KERBEROS; else { fprintf(stderr,"Invalid authentication `%s' specified.\n", optarg); errflag++; @@ -207,11 +207,11 @@ struct query *ctl; /* option record to be initialized */ break; case 't': case LA_TIMEOUT: - ctl->timeout = atoi(optarg); + ctl->server.timeout = atoi(optarg); break; case 'E': case LA_ENVELOPE: - ctl->envelope = xstrdup(optarg); + ctl->server.envelope = xstrdup(optarg); break; case 'u': -- cgit v1.2.3