diff options
-rw-r--r-- | checkalias.c | 2 | ||||
-rw-r--r-- | driver.c | 12 | ||||
-rw-r--r-- | etrn.c | 10 | ||||
-rw-r--r-- | fetchmail.c | 24 | ||||
-rw-r--r-- | imap.c | 38 | ||||
-rw-r--r-- | pop3.c | 4 | ||||
-rw-r--r-- | report.c | 2 | ||||
-rw-r--r-- | sink.c | 14 |
8 files changed, 53 insertions, 53 deletions
diff --git a/checkalias.c b/checkalias.c index 9d2dfc46..d48826dd 100644 --- a/checkalias.c +++ b/checkalias.c @@ -187,7 +187,7 @@ int is_host_alias(const char *name, struct query *ctl) case NO_RECOVERY: /* non-recoverable name server error */ case TRY_AGAIN: /* temporary error on authoritative server */ default: - report(stderr, -1, + report(stderr, 0, _("nameserver failure while looking for `%s' during poll of %s."), name, ctl->server.pollname); ctl->errcount++; @@ -1167,7 +1167,7 @@ const char *canonical; /* server name */ "KPOPV0.1")); if (rem != KSUCCESS) { - report(stderr, -1, _("kerberos error %s"), (krb_get_err_text (rem))); + report(stderr, 0, _("kerberos error %s"), (krb_get_err_text (rem))); return (PS_AUTHFAIL); } return (0); @@ -1355,7 +1355,7 @@ const struct method *proto; /* protocol method table */ #ifndef KERBEROS_V4 if (ctl->server.preauthenticate == A_KERBEROS_V4) { - report(stderr, -1, _("Kerberos V4 support not linked.")); + report(stderr, 0, _("Kerberos V4 support not linked.")); return(PS_ERROR); } #endif /* KERBEROS_V4 */ @@ -1363,7 +1363,7 @@ const struct method *proto; /* protocol method table */ #ifndef KERBEROS_V5 if (ctl->server.preauthenticate == A_KERBEROS_V5) { - report(stderr, -1, _("Kerberos V5 support not linked.")); + report(stderr, 0, _("Kerberos V5 support not linked.")); return(PS_ERROR); } #endif /* KERBEROS_V5 */ @@ -1592,14 +1592,14 @@ const struct method *proto; /* protocol method table */ if (ok != 0) { if (ok == PS_LOCKBUSY) - report(stderr, -1, _("Lock-busy error on %s@%s"), + report(stderr, 0, _("Lock-busy error on %s@%s"), ctl->remotename, ctl->server.truename); else { if (ok == PS_ERROR) ok = PS_AUTHFAIL; - report(stderr, -1, _("Authorization failure on %s@%s"), + report(stderr, 0, _("Authorization failure on %s@%s"), ctl->remotename, ctl->server.truename); @@ -2117,7 +2117,7 @@ const struct method *proto; /* protocol method table */ if (ok==PS_SOCKET || ok==PS_AUTHFAIL || ok==PS_SYNTAX || ok==PS_IOERR || ok==PS_ERROR || ok==PS_PROTOCOL || ok==PS_LOCKBUSY || ok==PS_SMTP) - report(stderr,-1, _("%s error while fetching from %s"), msg, ctl->server.pollname); + report(stderr,0, _("%s error while fetching from %s"), msg, ctl->server.pollname); closeUp: /* execute post-initialization command, if any */ @@ -84,23 +84,23 @@ static int etrn_getrange(int sock, struct query *ctl, const char *id, break; case 458: /* Unable to queue messages for node <x> */ - report(stderr, -1, _("Unable to queue messages for node %s"),qnp->id); + report(stderr, 0, _("Unable to queue messages for node %s"),qnp->id); return(PS_PROTOCOL); case 459: /* Node <x> not allowed: <reason> */ - report(stderr, -1, _("Node %s not allowed: %s"), qnp->id, buf); + report(stderr, 0, _("Node %s not allowed: %s"), qnp->id, buf); return(PS_AUTHFAIL); case 500: /* Syntax Error */ - report(stderr, -1, _("ETRN syntax error")); + report(stderr, 0, _("ETRN syntax error")); return(PS_PROTOCOL); case 501: /* Syntax Error in Parameters */ - report(stderr, -1, _("ETRN syntax error in parameters")); + report(stderr, 0, _("ETRN syntax error in parameters")); return(PS_PROTOCOL); default: - report(stderr, -1, _("Unknown ETRN error %d"), atoi(buf)); + report(stderr, 0, _("Unknown ETRN error %d"), atoi(buf)); return(PS_PROTOCOL); } } diff --git a/fetchmail.c b/fetchmail.c index f17ae6c0..f0fd8997 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -525,7 +525,7 @@ int main (int argc, char **argv) { if (ctl->wedged) { - report(stderr, -1, + report(stderr, 0, _("poll of %s skipped (failed authentication or too many timeouts)"), ctl->server.pollname); continue; @@ -537,7 +537,7 @@ int main (int argc, char **argv) if (ctl->server.poll_count++ % ctl->server.interval) { if (outlevel >= O_VERBOSE) - report(stdout, -1, + report(stdout, 0, _("interval not reached, not querying %s"), ctl->server.pollname); continue; @@ -628,12 +628,12 @@ int main (int argc, char **argv) unwedged++; if (!unwedged) { - report(stderr, -1, _("All connections are wedged. Exiting.")); + report(stderr, 0, _("All connections are wedged. Exiting.")); exit(PS_AUTHFAIL); } if (outlevel >= O_VERBOSE) - report(stdout, -1, _("fetchmail: sleeping at %s"), rfc822timestamp()); + report(stdout, 0, _("fetchmail: sleeping at %s"), rfc822timestamp()); /* * With this simple hack, we make it possible for a foreground @@ -745,13 +745,13 @@ int main (int argc, char **argv) signal(SIGHUP, SIG_IGN); if (outlevel >= O_VERBOSE) - report(stdout, -1, _("awakened at %s"), rfc822timestamp()); + report(stdout, 0, _("awakened at %s"), rfc822timestamp()); } } while (run.poll_interval); if (outlevel >= O_VERBOSE) - report(stdout, -1, _("normal termination, status %d"), + report(stdout, 0, _("normal termination, status %d"), successes ? PS_SUCCESS : querystatus); termhook(0); @@ -1227,7 +1227,7 @@ static int query_host(struct query *ctl) time_t now; time(&now); - report(stdout, -1, _("%s querying %s (protocol %s) at %s"), + report(stdout, 0, _("%s querying %s (protocol %s) at %s"), VERSION, ctl->server.pollname, showproto(ctl->server.protocol), ctime(&now)); } @@ -1246,7 +1246,7 @@ static int query_host(struct query *ctl) #ifdef POP2_ENABLE return(doPOP2(ctl)); #else - report(stderr, -1, _("POP2 support is not configured.\n")); + report(stderr, 0, _("POP2 support is not configured.\n")); return(PS_PROTOCOL); #endif /* POP2_ENABLE */ break; @@ -1256,7 +1256,7 @@ static int query_host(struct query *ctl) #ifdef POP3_ENABLE return(doPOP3(ctl)); #else - report(stderr, -1, _("POP3 support is not configured.\n")); + report(stderr, 0, _("POP3 support is not configured.\n")); return(PS_PROTOCOL); #endif /* POP3_ENABLE */ break; @@ -1268,19 +1268,19 @@ static int query_host(struct query *ctl) #ifdef IMAP_ENABLE return(doIMAP(ctl)); #else - report(stderr, -1, _("IMAP support is not configured.\n")); + report(stderr, 0, _("IMAP support is not configured.\n")); return(PS_PROTOCOL); #endif /* IMAP_ENABLE */ break; case P_ETRN: #ifndef ETRN_ENABLE - report(stderr, -1, _("ETRN support is not configured.\n")); + report(stderr, 0, _("ETRN support is not configured.\n")); return(PS_PROTOCOL); #else #ifdef HAVE_GETHOSTBYNAME return(doETRN(ctl)); #else - report(stderr, -1, _("Cannot support ETRN without gethostbyname(2).\n")); + report(stderr, 0, _("Cannot support ETRN without gethostbyname(2).\n")); return(PS_PROTOCOL); #endif /* HAVE_GETHOSTBYNAME */ #endif /* ETRN_ENABLE */ @@ -142,7 +142,7 @@ static int do_otp(int sock, struct query *ctl) return rval; if ((i = from64tobits(challenge, buffer)) < 0) { - report(stderr, -1, _("Could not decode initial BASE64 challenge")); + report(stderr, 0, _("Could not decode initial BASE64 challenge")); return PS_AUTHFAIL; }; @@ -158,7 +158,7 @@ static int do_otp(int sock, struct query *ctl) return rval; if ((i = from64tobits(challenge, buffer)) < 0) { - report(stderr, -1, _("Could not decode OTP challenge")); + report(stderr, 0, _("Could not decode OTP challenge")); return PS_AUTHFAIL; }; @@ -241,7 +241,7 @@ static int do_rfc1731(int sock, char *truename) len = from64tobits(challenge1.cstr, buf1); if (len < 0) { - report(stderr, -1, _("could not decode initial BASE64 challenge")); + report(stderr, 0, _("could not decode initial BASE64 challenge")); return PS_AUTHFAIL; } @@ -270,13 +270,13 @@ static int do_rfc1731(int sock, char *truename) result = krb_mk_req(&authenticator, "imap", srvinst, srvrealm, 0); if (result) { - report(stderr, -1, "krb_mq_req: %s", krb_get_err_text(result)); + report(stderr, 0, "krb_mq_req: %s", krb_get_err_text(result)); return PS_AUTHFAIL; } result = krb_get_cred("imap", srvinst, srvrealm, &credentials); if (result) { - report(stderr, -1, "krb_get_cred: %s", krb_get_err_text(result)); + report(stderr, 0, "krb_get_cred: %s", krb_get_err_text(result)); return PS_AUTHFAIL; } @@ -286,12 +286,12 @@ static int do_rfc1731(int sock, char *truename) result = krb_get_tf_fullname(TKT_FILE, tktuser, tktinst, tktrealm); if (result) { - report(stderr, -1, "krb_get_tf_fullname: %s", krb_get_err_text(result)); + report(stderr, 0, "krb_get_tf_fullname: %s", krb_get_err_text(result)); return PS_AUTHFAIL; } if (strcmp(tktuser, user) != 0) { - report(stderr, -1, _("principal %s in ticket does not match -u %s"), tktuser, + report(stderr, 0, _("principal %s in ticket does not match -u %s"), tktuser, user); return PS_AUTHFAIL; } @@ -311,7 +311,7 @@ static int do_rfc1731(int sock, char *truename) result = krb_mk_req(&authenticator, "imap", srvinst, srvrealm, challenge1.cint); if (result) { - report(stderr, -1, "krb_mq_req: %s", krb_get_err_text(result)); + report(stderr, 0, "krb_mq_req: %s", krb_get_err_text(result)); return PS_AUTHFAIL; } @@ -363,14 +363,14 @@ static int do_rfc1731(int sock, char *truename) len = from64tobits(buf2, buf1); if (len < 0) { - report(stderr, -1, _("could not decode BASE64 ready response")); + report(stderr, 0, _("could not decode BASE64 ready response")); return PS_AUTHFAIL; } des_ecb_encrypt((des_cblock *)buf2, (des_cblock *)buf2, schedule, 0); memcpy(challenge2.cstr, buf2, 4); if (ntohl(challenge2.cint) != challenge1.cint + 1) { - report(stderr, -1, _("challenge mismatch")); + report(stderr, 0, _("challenge mismatch")); return PS_AUTHFAIL; } @@ -443,7 +443,7 @@ static int do_gssauth(int sock, char *hostname, char *username) maj_stat = gss_import_name(&min_stat, &request_buf, gss_nt_service_name, &target_name); if (maj_stat != GSS_S_COMPLETE) { - report(stderr, -1, _("Couldn't get service name for [%s]"), buf1); + report(stderr, 0, _("Couldn't get service name for [%s]"), buf1); return PS_AUTHFAIL; } else if (outlevel >= O_DEBUG) { @@ -471,7 +471,7 @@ static int do_gssauth(int sock, char *hostname, char *username) &context, target_name, NULL, 0, 0, NULL, sec_token, NULL, &send_token, &cflags, NULL); if (maj_stat!=GSS_S_COMPLETE && maj_stat!=GSS_S_CONTINUE_NEEDED) { - report(stderr, -1,_("Error exchanging credentials")); + report(stderr, 0,_("Error exchanging credentials")); gss_release_name(&min_stat, &target_name); /* wake up server and await NO response */ SockWrite(sock, "\r\n", 2); @@ -507,7 +507,7 @@ static int do_gssauth(int sock, char *hostname, char *username) maj_stat = gss_unwrap(&min_stat, context, &request_buf, &send_token, &cflags, &quality); if (maj_stat != GSS_S_COMPLETE) { - report(stderr, 0,-1,_("Couldn't unwrap security level data")); + report(stderr, 0,_("Couldn't unwrap security level data")); gss_release_buffer(&min_stat, &send_token); return PS_AUTHFAIL; } @@ -516,7 +516,7 @@ static int do_gssauth(int sock, char *hostname, char *username) /* first octet is security levels supported. We want none, for now */ server_conf_flags = ((char *)send_token.value)[0]; if ( !(((char *)send_token.value)[0] & GSSAUTH_P_NONE) ) { - report(stderr, 0,-1,_("Server requires integrity and/or privacy")); + report(stderr, 0,_("Server requires integrity and/or privacy")); gss_release_buffer(&min_stat, &send_token); return PS_AUTHFAIL; } @@ -542,7 +542,7 @@ static int do_gssauth(int sock, char *hostname, char *username) maj_stat = gss_wrap(&min_stat, context, 0, GSS_C_QOP_DEFAULT, &request_buf, &cflags, &send_token); if (maj_stat != GSS_S_COMPLETE) { - report(stderr, 0,-1,_("Error creating security level request")); + report(stderr, 0,_("Error creating security level request")); return PS_AUTHFAIL; } to64frombits(buf1, send_token.value, send_token.length); @@ -562,7 +562,7 @@ static int do_gssauth(int sock, char *hostname, char *username) report(stdout, 0, _("Releasing GSS credentials")); maj_stat = gss_delete_sec_context(&min_stat, &context, &send_token); if (maj_stat != GSS_S_COMPLETE) { - report(stderr, -1, _("Error releasing credentials")); + report(stderr, 0, _("Error releasing credentials")); return PS_AUTHFAIL; } /* send_token may contain a notification to the server to flush @@ -651,7 +651,7 @@ int imap_getauth(int sock, struct query *ctl, char *greeting) } else if (ctl->server.protocol == P_IMAP_GSS) { - report(stderr, 0,-1, _("Required GSS capability not supported by server")); + report(stderr, 0, _("Required GSS capability not supported by server")); return(PS_AUTHFAIL); } #endif /* GSSAPI */ @@ -677,7 +677,7 @@ int imap_getauth(int sock, struct query *ctl, char *greeting) } else if (ctl->server.protocol == P_IMAP_K4) { - report(stderr, 0,-1, _("Required KERBEROS_V4 capability not supported by server")); + report(stderr, 0, _("Required KERBEROS_V4 capability not supported by server")); return(PS_AUTHFAIL); } #endif /* KERBEROS_V4 */ @@ -685,7 +685,7 @@ int imap_getauth(int sock, struct query *ctl, char *greeting) #ifdef __UNUSED__ /* The Cyrus IMAP4rev1 server chokes on this */ /* this handles either AUTH=LOGIN or AUTH-LOGIN */ if ((imap_version >= IMAP4rev1) && (!strstr(capabilities, "LOGIN"))) { - report(stderr, 0,-1, _("Required LOGIN capability not supported by server")); + report(stderr, 0, _("Required LOGIN capability not supported by server")); return PS_AUTHFAIL; }; #endif /* __UNUSED__ */ @@ -205,7 +205,7 @@ int pop3_getauth(int sock, struct query *ctl, char *greeting) for (start = greeting; *start != 0 && *start != '<'; start++) continue; if (*start == 0) { - report(stderr, -1, _("Required APOP timestamp not found in greeting")); + report(stderr, 0, _("Required APOP timestamp not found in greeting")); return(PS_AUTHFAIL); } @@ -213,7 +213,7 @@ int pop3_getauth(int sock, struct query *ctl, char *greeting) for (end = start; *end != 0 && *end != '>'; end++) continue; if (*end == 0 || end == start + 1) { - report(stderr, -1, _("Timestamp syntax error in greeting")); + report(stderr, 0, _("Timestamp syntax error in greeting")); return(PS_AUTHFAIL); } else @@ -216,7 +216,7 @@ report (FILE *errfp, errnum, message, va_alist) fprintf (errfp, message, a1, a2, a3, a4, a5, a6, a7, a8); #endif - if (errnum && errnum != -1) { + if (errnum) { char *tmps = strerror(errnum); if (tmps) { fprintf (errfp, ": %s", tmps); @@ -413,7 +413,7 @@ static int handle_smtp_report(struct query *ctl, struct msgblk *msg) * an error when the return code is less specific. */ if (smtperr >= 400) - report(stderr, -1, _("%cMTP error: %s"), + report(stderr, 0, _("%cMTP error: %s"), ctl->listener, smtp_response); @@ -516,7 +516,7 @@ int open_sink(struct query *ctl, struct msgblk *msg, if (ferror(sinkfp)) { - report(stderr, -1, _("BSMTP file open or preamble write failed")); + report(stderr, 0, _("BSMTP file open or preamble write failed")); return(PS_BSMTP); } } @@ -846,7 +846,7 @@ int close_sink(struct query *ctl, struct msgblk *msg, flag forward) signal(SIGCHLD, sigchld); if (rc) { - report(stderr, -1, _("MDA exited abnormally or returned nonzero status")); + report(stderr, 0, _("MDA exited abnormally or returned nonzero status")); return(FALSE); } } @@ -858,7 +858,7 @@ int close_sink(struct query *ctl, struct msgblk *msg, flag forward) fclose(sinkfp); if (ferror(sinkfp)) { - report(stderr, -1, _("Message termination or close of BSMTP file failed")); + report(stderr, 0, _("Message termination or close of BSMTP file failed")); return(FALSE); } } @@ -871,7 +871,7 @@ int close_sink(struct query *ctl, struct msgblk *msg, flag forward) return(FALSE); else { - report(stderr, -1, _("SMTP listener refused delivery")); + report(stderr, 0, _("SMTP listener refused delivery")); return(TRUE); } } @@ -899,9 +899,9 @@ int close_sink(struct query *ctl, struct msgblk *msg, flag forward) * comply. */ if (atoi(smtp_response) == 503) - report(stderr, -1, _("LMTP delivery error on EOM")); + report(stderr, 0, _("LMTP delivery error on EOM")); else - report(stderr, -1, + report(stderr, 0, _("Unexpected non-503 response to LMTP EOM: %s"), smtp_response); |