summaryrefslogtreecommitdiff
path: root/smtp.c
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@users.sourceforge.net>2003-07-14 19:10:00 +0000
committerJosé Fonseca <jrfonseca@users.sourceforge.net>2003-07-14 19:10:00 +0000
commitd69bdaea5c3261a286be38e41e975223b11e907b (patch)
tree3751632b9d1d3653cdcff7f1cc560678c2fc8112 /smtp.c
parent6537f4cfd63c00812584f1325a19615541f6417a (diff)
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.
Diffstat (limited to 'smtp.c')
-rw-r--r--smtp.c11
1 files changed, 5 insertions, 6 deletions
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;