From: Kern Sibbald Date: Mon, 19 Aug 2002 13:06:26 +0000 (+0000) Subject: Display email command on error X-Git-Tag: Release-1.25~39 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3a14c88e136059d13b4e607b2dd5a766e98503d3;p=bacula%2Fbacula Display email command on error git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@104 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/lib/message.c b/bacula/src/lib/message.c index 3b5e59b1a6..93019a31c6 100755 --- a/bacula/src/lib/message.c +++ b/bacula/src/lib/message.c @@ -499,7 +499,8 @@ void close_msg(void *vjcr) * kaboom. */ if (stat < 0 && msgs != daemon_msgs) { - Emsg0(M_ERROR, 0, _("Mail program terminated in error.\n")); + Emsg1(M_ERROR, 0, _("Mail program terminated in error.\nCMD=%s\n"), + cmd); } free_memory(line); rem_temp_file: @@ -636,7 +637,6 @@ void dispatch_message(void *vjcr, int type, int level, char *msg) Dmsg1(200, "OPERATOR for following err: %s\n", msg); mcmd = get_pool_memory(PM_MESSAGE); d->fd = open_mail_pipe(jcr, &mcmd, d); - free_pool_memory(mcmd); if (d->fd) { int stat; fputs(msg, d->fd); @@ -644,9 +644,11 @@ void dispatch_message(void *vjcr, int type, int level, char *msg) stat = pclose(d->fd); d->fd = NULL; if (stat < 0) { - Emsg0(M_ERROR, 0, _("Operator mail program terminated in error.\n")); + Emsg1(M_ERROR, 0, _("Operator mail program terminated in error.\nCMD=%s\n"), + mcmd); } } + free_pool_memory(mcmd); break; case MD_MAIL: case MD_MAIL_ON_ERROR: