X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=odmr.c;h=64e70bcebb3e1af0311fec11474b48d24dc328ea;hb=f78031293074cfd648a4f5453727a687d6886490;hp=907e0092cb47169c27d4f7b94058ffe1c1e40a8b;hpb=56a569ff306e08ecb5f8252a865617ed7e602a6a;p=~andy%2Ffetchmail diff --git a/odmr.c b/odmr.c index 907e0092..64e70bce 100644 --- a/odmr.c +++ b/odmr.c @@ -9,24 +9,15 @@ #include #include #include -#ifdef HAVE_STRING_H /* strcat() */ #include -#endif -#ifdef HAVE_NET_SOCKET_H /* BeOS needs this */ -#include -#endif #include -#ifdef HAVE_NET_SELECT_H /* AIX needs this */ -#include -#endif -#ifdef HAVE_SYS_SELECT_H /* AIX 4.1, at least, needs this */ #include -#endif #include #include #include -#include "i18n.h" +#include "gettext.h" #include "fetchmail.h" +#include "sdump.h" #include "smtp.h" #include "socket.h" @@ -126,9 +117,12 @@ static int odmr_getrange(int sock, struct query *ctl, const char *id, report(stderr, GT_("Authentication required.\n")); return(PS_AUTHFAIL); - default: - report(stderr, GT_("Unknown ODMR error %d\n"), atoi(buf)); - return(PS_PROTOCOL); + default: { + char *t = sdump(buf, strlen(buf)); + report(stderr, GT_("Unknown ODMR error \"%s\"\n"), t); + xfree(t); + return(PS_PROTOCOL); + } } /* @@ -148,7 +142,6 @@ static int odmr_getrange(int sock, struct query *ctl, const char *id, { fd_set readfds; struct timeval timeout; - char buf[MSGBUFSIZE]; FD_ZERO(&readfds); FD_SET(sock, &readfds);