]> mj.ucw.cz Git - umpf.git/blobdiff - int.c
fix saving bodies
[umpf.git] / int.c
diff --git a/int.c b/int.c
index d4360c6696cb60a5eae84f49c6d4dd7f56a87492..e1c906f058342ada6c8d264876d5f4fcc48bed35 100644 (file)
--- a/int.c
+++ b/int.c
@@ -7,6 +7,7 @@
 #include <fcntl.h>
 #include <stdarg.h>
 #include <sys/wait.h>
+#include <sysexits.h>
 
 #include "cond.tab.h"
 #include "umpf.h"
@@ -17,7 +18,7 @@
 
 #define INT_TO_STRING_LEN ((sizeof(int)*4*CHAR_BIT)/10 + 6)
 
-static void __attribute__ ((noreturn)) 
+void __attribute__ ((noreturn)) 
 bye(int code, char* msg, ...)
 {
         va_list args;
@@ -391,7 +392,7 @@ deliver(char* where, int copy, struct list* hash)
 
        if (!copy) {
                if (res)
-                       bye(-res, "%m");
+                       bye(EX_TEMPFAIL, "%m");
                else
                        bye(0, NULL);
        }
@@ -426,7 +427,7 @@ end:
        destroy_email(em);
        if (!copy) {
                if (res)
-                       bye(-res, "%m");
+                       bye(EX_TEMPFAIL, "%m");
                else
                        bye(0, NULL);
        }