aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fetchmail.c6
-rw-r--r--fetchmail.h4
-rw-r--r--options.c16
-rw-r--r--pop3.c2
4 files changed, 13 insertions, 15 deletions
diff --git a/fetchmail.c b/fetchmail.c
index 3c6a377c..9c2c02b5 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -228,7 +228,7 @@ struct optrec *options;
{
if (outlevel != O_SILENT)
fprintf(stderr, "popclient: querying %s\n", options->servername);
- switch (options->whichpop) {
+ switch (options->protocol) {
case P_POP2:
return(doPOP2(options));
break;
@@ -274,7 +274,7 @@ struct optrec *options;
printf(" Password = '%s'\n", options->password);
printf(" Protocol is ");
- switch (options->whichpop)
+ switch (options->protocol)
{
case P_POP2: printf("POP2\n"); break;
case P_POP3: printf("POP3\n"); break;
@@ -307,7 +307,7 @@ struct optrec *options;
default:
printf(" Message destination unknown?!?\n");
}
- if (options->verbose)
+ if (outlevel == O_VERBOSE)
{
if (options->output != TO_FOLDER)
printf(" (Mail folder would have been '%s')\n", options->userfolder);
diff --git a/fetchmail.h b/fetchmail.h
index 90b8ee63..773daff3 100644
--- a/fetchmail.h
+++ b/fetchmail.h
@@ -45,12 +45,10 @@
#define TO_STDOUT 2 /* use stdout */
#define TO_MDA 3 /* use agent */
-/* Command-line arguments are passed in this structure type */
struct optrec {
int versioninfo;
int keep;
- int verbose;
- int whichpop;
+ int protocol;
int limit;
int fetchall;
int flush;
diff --git a/options.c b/options.c
index 7b9e8c87..df7c3a7d 100644
--- a/options.c
+++ b/options.c
@@ -109,10 +109,10 @@ struct optrec *options;
switch (c) {
case '2':
- options->whichpop = P_POP2;
+ options->protocol = P_POP2;
break;
case '3':
- options->whichpop = P_POP3;
+ options->protocol = P_POP3;
break;
case 'V':
case LA_VERSION:
@@ -164,15 +164,15 @@ struct optrec *options;
case LA_PROTOCOL:
/* XXX -- should probably use a table lookup here */
if (strcasecmp(optarg,"pop2") == 0)
- options->whichpop = P_POP2;
+ options->protocol = P_POP2;
else if (strcasecmp(optarg,"pop3") == 0)
- options->whichpop = P_POP3;
+ options->protocol = P_POP3;
else if (strcasecmp(optarg,"imap") == 0)
- options->whichpop = P_IMAP;
+ options->protocol = P_IMAP;
else if (strcasecmp(optarg,"apop") == 0)
- options->whichpop = P_APOP;
+ options->protocol = P_APOP;
else if (strcasecmp(optarg,"rpop") == 0)
- options->whichpop = P_RPOP;
+ options->protocol = P_RPOP;
else {
fprintf(stderr,"Invalid protocol '%s'\n specified.\n", optarg);
errflag++;
@@ -289,7 +289,7 @@ struct optrec *options;
return(-1);
}
- options->whichpop = DEF_PROTOCOL;
+ options->protocol = DEF_PROTOCOL;
#if defined(KEEP_IS_DEFAULT)
options->keep = 1;
diff --git a/pop3.c b/pop3.c
index 5c6d7cdd..a0241c6f 100644
--- a/pop3.c
+++ b/pop3.c
@@ -295,7 +295,7 @@ int socket;
{
char buf [POPBUFSIZE];
- switch (options->whichpop) {
+ switch (options->protocol) {
case P_POP3:
SockPrintf(socket,"USER %s\r\n",options->remotename);
if (outlevel == O_VERBOSE)