X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=etrn.c;h=24c532d306607967af0c7dd47ea1128ac1b09988;hb=a23a8cf8ee1da51c4392b9f52e6b72b0c01e3b5e;hp=eb953008f0e634ec12e5ff54b47ba1957f715b49;hpb=2cabbf89f9f696a4786476a4eda7a59a1c16d486;p=~andy%2Ffetchmail diff --git a/etrn.c b/etrn.c index eb953008..24c532d3 100644 --- a/etrn.c +++ b/etrn.c @@ -9,13 +9,10 @@ #include #include #include -#ifdef HAVE_NET_SOCKET_H /* BeOS needs this */ -#include -#endif #include #include #include -#include "i18n.h" +#include "gettext.h" #include "fetchmail.h" #include "smtp.h" #include "socket.h" @@ -25,7 +22,8 @@ static int etrn_ok (int sock, char *argbuf) { int ok; - ok = SMTP_ok(sock); + (void)argbuf; + ok = SMTP_ok(sock, SMTP_MODE, TIMEOUT_DEFAULT); if (ok == SM_UNRECOVERABLE) return(PS_PROTOCOL); else @@ -40,7 +38,8 @@ static int etrn_getrange(int sock, struct query *ctl, const char *id, char buf [MSGBUFSIZE+1]; struct idlist *qnp; /* pointer to Q names */ - if ((ok = SMTP_ehlo(sock, fetchmailhost, + (void)id; + if ((ok = SMTP_ehlo(sock, SMTP_MODE, fetchmailhost, ctl->server.esmtp_name, ctl->server.esmtp_password, &opts))) { @@ -65,7 +64,7 @@ static int etrn_getrange(int sock, struct query *ctl, const char *id, for (qnp = ctl->domainlist; qnp; qnp = qnp->next) { /* ship the actual poll and get the response */ - gen_send(sock, "ETRN %s", (char *)qnp->id); + gen_send(sock, "ETRN %s", qnp->id); if ((ok = gen_recv(sock, buf, sizeof(buf)))) return(ok); @@ -116,6 +115,7 @@ static int etrn_getrange(int sock, struct query *ctl, const char *id, static int etrn_logout(int sock, struct query *ctl) /* send logout command */ { + (void)ctl; return(gen_transact(sock, "QUIT")); } @@ -137,6 +137,7 @@ static const struct method etrn = NULL, /* no message trailer */ NULL, /* how to delete a message */ NULL, /* how to mark a message as seen */ + NULL, /* no mailbox support */ etrn_logout, /* log out, we're done */ FALSE, /* no, we can't re-poll */ }; @@ -155,7 +156,7 @@ int doETRN (struct query *ctl) return(PS_SYNTAX); } if (ctl->mailboxes->id) { - fprintf(stderr, GT_("Option --remote is not supported with ETRN\n")); + fprintf(stderr, GT_("Option --folder is not supported with ETRN\n")); return(PS_SYNTAX); } if (check_only) {