From d69bdaea5c3261a286be38e41e975223b11e907b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fonseca?= Date: Mon, 14 Jul 2003 19:10:00 +0000 Subject: Check th MDA return status. Fixed a bug the input buffering which when using the '-t' option and piping the input caused the parsed headers to be lost. Undo the inclusion of the debian directory and the source package. Tweak the dpkggen.sh script. --- smtp.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'smtp.c') diff --git a/smtp.c b/smtp.c index 033edaf..1ad0832 100644 --- a/smtp.c +++ b/smtp.c @@ -135,17 +135,16 @@ static const char * message_cb (void **buf, int *len, void *arg) int octets; if (len == NULL) + { + /* only allow rewinding in the beginning of a message otherwise + * it will break the pipes */ assert(*buf == NULL); + return; + } if (*buf == NULL) *buf = malloc (BUFSIZ); - if (len == NULL) - { - message_rewind(message); - return NULL; - } - *len = message_read(message, *buf, BUFSIZ); return *buf; -- cgit v1.2.3