From 2148260d742663448a8fd7ff950d3d8e7468ccd5 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Tue, 27 Apr 2010 09:48:55 +0200 Subject: Report unknown ODMR error in full, escaping unprintables. --- odmr.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/odmr.c b/odmr.c index 907e0092..9efafe08 100644 --- a/odmr.c +++ b/odmr.c @@ -27,6 +27,7 @@ #include #include "i18n.h" #include "fetchmail.h" +#include "sdump.h" #include "smtp.h" #include "socket.h" @@ -126,9 +127,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); + } } /* -- cgit v1.2.3