]> mj.ucw.cz Git - umpf.git/blobdiff - ham.c
cleanup in error messages
[umpf.git] / ham.c
diff --git a/ham.c b/ham.c
index 1441451d246e78d83bbd89f894743c6a05acf7b8..3e6dade23fc652ace1c8ff1b9a8fa004ddf193a0 100644 (file)
--- a/ham.c
+++ b/ham.c
@@ -154,7 +154,7 @@ get_body(int rfd)
                        fd = mkstemp(tmpfile);
                        /* cannot create tmpfile, try to continue reading */
                        if (fd < 0)
-                               bye(EX_TEMPFAIL, "%m");
+                               bye(EX_TEMPFAIL, "Cannot create temporary file: %m");
                        else {
                                will_save = 1;
                                b->body = NULL;
@@ -163,7 +163,7 @@ get_body(int rfd)
                                res = write(fd, buf, MAIL_LEN);
                                if (res < MAIL_LEN) {
                                        unlink(b->tmpfile);
-                                       bye(EX_TEMPFAIL, "%m");
+                                       bye(EX_TEMPFAIL, "Cannot write to remporary file: %m");
                                }
                                break;  
                        }
@@ -181,14 +181,14 @@ get_body(int rfd)
                                res = write(fd, buf, MAIL_LEN);
                                if (res < MAIL_LEN) {
                                        unlink(b->tmpfile);
-                                       bye(EX_TEMPFAIL, "%m");
+                                       bye(EX_TEMPFAIL, "Cannot write to temporary file: %m");
                                }
                        }
                }
                res = write(fd, buf, j);
                if (res < j) {
                        unlink(b->tmpfile);
-                       bye(EX_TEMPFAIL, "%m");
+                       bye(EX_TEMPFAIL, "Cannot write to temporary file: %m");
                }
        }
        return b; 
@@ -343,8 +343,6 @@ copy_email(int fd, struct email* email)
        }
 
        write_char_to_mailbox('\n', fd);
-       /* body */
-       /* FIXME: do not forget change Content-Length */
        if (email->body) {
                for (pc = email->body; pc < email->body + email->body_len; pc++){
                                write_char_to_mailbox(*pc, fd);