OSSP CVS Repository

ossp - Difference in ossp-pkg/petidomo/mailer.c versions 1.5 and 1.6
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/petidomo/mailer.c 1.5 -> 1.6

--- mailer.c     2001/01/18 20:30:50     1.5
+++ mailer.c     2001/01/19 14:56:33     1.6
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/mailer.c,v $
-   $Revision: 1.5 $
+   $Revision: 1.6 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -23,6 +23,8 @@
 #include <sys/wait.h>
 #include <unistd.h>
 #include <ctype.h>
+#include <string.h>
+#include <errno.h>
 
 #include "libtext/text.h"
 #include "petidomo.h"
@@ -112,7 +114,7 @@
 
     fh = popen(cmdline, "w");
     if (fh == NULL)
-        syslog(LOG_ERR, "Failed opening pipe to \"%s\": %m", cmdline);
+        syslog(LOG_ERR, "Failed opening pipe to \"%s\": %s", cmdline, strerror(errno));
 
     free(cmdline);
     return fh;
@@ -218,7 +220,7 @@
         arguments[counter++] = NULL;
         if (pipe(fildes) == -1)
             {
-            syslog(LOG_ERR, "Couldn't open a pipe to my child process: %m");
+            syslog(LOG_ERR, "Couldn't open a pipe to my child process: %s", strerror(errno));
             return -1;
             }
         child_pid = fork();
@@ -229,16 +231,16 @@
                 close(MYPIPE_WRITE);
                 if (dup2(MYPIPE_READ, STDIN_FILENO) == -1)
                     {
-                    syslog(LOG_ERR, "Child process couldn't read from pipe: %m");
+                    syslog(LOG_ERR, "Child process couldn't read from pipe: %s", strerror(errno));
                     return -1;
                     }
                 close(MYPIPE_READ);
                 execv(MasterConfig->mta, arguments);
-                syslog(LOG_ERR, "Couldn't exec(\"%s\"): %m", MasterConfig->mta);
+                syslog(LOG_ERR, "Couldn't exec(\"%s\"): %s", MasterConfig->mta, strerror(errno));
                 return -1;
             case -1:
                 /* Error */
-                syslog(LOG_ERR, "Couldn't fork: %m");
+                syslog(LOG_ERR, "Couldn't fork: %s", strerror(errno));
                 return -1;
             default:
                 /* everything is fine */

CVSTrac 2.0.1