summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilip Hazel <ph10@hermes.cam.ac.uk>2006-03-08 10:49:18 +0000
committerPhilip Hazel <ph10@hermes.cam.ac.uk>2006-03-08 10:49:18 +0000
commit898d150f9aa9c796bb01117bc438b24ddb2e7435 (patch)
tree36c1f403bd00404eab6a68df4d403163ae196578 /src
parent2c5db4fd26b481bff53f546eed83d373db4f130b (diff)
Tidies to SMTP dialogue debugging output.
Diffstat (limited to 'src')
-rw-r--r--src/src/auths/get_data.c3
-rw-r--r--src/src/smtp_in.c15
2 files changed, 15 insertions, 3 deletions
diff --git a/src/src/auths/get_data.c b/src/src/auths/get_data.c
index a53381c39..f0df39ea7 100644
--- a/src/src/auths/get_data.c
+++ b/src/src/auths/get_data.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/auths/get_data.c,v 1.3 2006/02/07 11:19:01 ph10 Exp $ */
+/* $Cambridge: exim/src/src/auths/get_data.c,v 1.4 2006/03/08 10:49:18 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -40,6 +40,7 @@ while ((c = receive_getc()) != '\n' && c != EOF)
}
if (p > 0 && big_buffer[p-1] == '\r') p--;
big_buffer[p] = 0;
+DEBUG(D_receive) debug_printf("SMTP<< %s\n", big_buffer);
if (Ustrcmp(big_buffer, "*") == 0) return CANCELLED;
*aptr = big_buffer;
return OK;
diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c
index 224eba9f7..1ed5183a6 100644
--- a/src/src/smtp_in.c
+++ b/src/src/smtp_in.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/smtp_in.c,v 1.35 2006/03/06 16:05:12 ph10 Exp $ */
+/* $Cambridge: exim/src/src/smtp_in.c,v 1.36 2006/03/08 10:49:18 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -338,8 +338,13 @@ va_list ap;
DEBUG(D_receive)
{
+ uschar *cr, *end;
va_start(ap, format);
(void) string_vformat(big_buffer, big_buffer_size, format, ap);
+ va_end(ap);
+ end = big_buffer + Ustrlen(big_buffer);
+ while ((cr = Ustrchr(big_buffer, '\r')) != NULL) /* lose CRs */
+ memmove(cr, cr + 1, (end--) - cr);
debug_printf("SMTP>> %s", big_buffer);
}
@@ -2643,7 +2648,13 @@ while (done <= 0)
#endif
(void)fwrite(s, 1, ptr, smtp_out);
- DEBUG(D_receive) debug_printf("SMTP>> %s", s);
+ DEBUG(D_receive)
+ {
+ uschar *cr;
+ while ((cr = Ustrchr(s, '\r')) != NULL) /* lose CRs */
+ memmove(cr, cr + 1, (ptr--) - (cr - s));
+ debug_printf("SMTP>> %s", s);
+ }
helo_seen = TRUE;
break; /* HELO/EHLO */