From: Art Cancro Date: Wed, 13 Jul 2011 17:30:01 +0000 (-0400) Subject: Clarified some of the error messages in citmail.c X-Git-Tag: v8.01~146 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=569e98920a0972227024024da3e36392103457f4 Clarified some of the error messages in citmail.c --- diff --git a/citadel/utils/citmail.c b/citadel/utils/citmail.c index 36b714f4b..8dd4a918c 100644 --- a/citadel/utils/citmail.c +++ b/citadel/utils/citmail.c @@ -228,12 +228,15 @@ int main(int argc, char **argv) { sp = strchr (buf, ' '); if (sp == NULL) { - if (debug) fprintf(stderr, "citmail: ould not calculate hostname.\n"); + if (debug) fprintf(stderr, "citmail: could not calculate hostname.\n"); cleanup(2); } sp ++; ep = strchr (sp, ' '); - if (ep == NULL) cleanup(3); + if (ep == NULL) { + if (debug) fprintf(stderr, "citmail: error parsing hostname\n"); + cleanup(3); + } *ep = '\0'; strncpy(hostname, sp, sizeof hostname); @@ -296,12 +299,18 @@ int main(int argc, char **argv) { serv_gets(buf); strcat(buf, " "); } while (buf[3] == '-'); - if (buf[0] != '2') cleanup(4); + if (buf[0] != '2') { + if (debug) fprintf(stderr, "citmail: LHLO command failed\n"); + cleanup(4); + } snprintf(buf, sizeof buf, "MAIL %s", fromline); serv_puts(buf); serv_gets(buf); - if (buf[0] != '2') cleanup(5); + if (buf[0] != '2') { + if (debug) fprintf(stderr, "citmail: MAIL command failed\n"); + cleanup(5); + } for (i=0; i