don't set q_statmta if the current host name is null
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Mon, 28 Nov 1994 08:36:42 +0000 (00:36 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Mon, 28 Nov 1994 08:36:42 +0000 (00:36 -0800)
SCCS-vsn: usr.sbin/sendmail/src/deliver.c 8.117

usr/src/usr.sbin/sendmail/src/deliver.c

index 61f370e..491b431 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)deliver.c  8.116 (Berkeley) %G%";
+static char sccsid[] = "@(#)deliver.c  8.117 (Berkeley) %G%";
 #endif /* not lint */
 
 #include "sendmail.h"
 #endif /* not lint */
 
 #include "sendmail.h"
@@ -1694,7 +1694,8 @@ markfailure(e, q, mci, rcode)
                q->q_status = stat;
 
        q->q_statdate = curtime();
                q->q_status = stat;
 
        q->q_statdate = curtime();
-       q->q_statmta = newstr(CurHostName);
+       if (CurHostName != NULL && CurHostName[0] != '\0')
+               q->q_statmta = newstr(CurHostName);
        if (rcode != EX_OK && q->q_rstatus == NULL)
        {
                char buf[30];
        if (rcode != EX_OK && q->q_rstatus == NULL)
        {
                char buf[30];