From 2eda2f02efaf475fd07ae6f43ed9ae7d35ecc429 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 16 Mar 2001 17:17:30 +0000 Subject: Don't use getdomainname: it's NIS crap, not DNS. * camel-mime-utils.c (header_msgid_generate): Don't use getdomainname: it's NIS crap, not DNS. svn path=/trunk/; revision=8761 --- camel/ChangeLog | 5 +++++ camel/camel-mime-utils.c | 10 ++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index 9074e6dd7c..5ac066c1ee 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,8 @@ +2001-03-16 Dan Winship + + * camel-mime-utils.c (header_msgid_generate): Don't use + getdomainname: it's NIS crap, not DNS. + 2001-03-15 Jeffrey Stedfast * camel.c (camel_init): Don't use the hardcoded cert db directory, diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c index b2abb59ef4..edec357160 100644 --- a/camel/camel-mime-utils.c +++ b/camel/camel-mime-utils.c @@ -2935,7 +2935,7 @@ header_raw_clear(struct _header_raw **list) char * header_msgid_generate (void) { - char host[MAXHOSTNAMELEN], domain[MAXHOSTNAMELEN]; + char host[MAXHOSTNAMELEN]; #ifdef ENABLE_THREADS static pthread_mutex_t count_lock = PTHREAD_MUTEX_INITIALIZER; #define COUNT_LOCK() pthread_mutex_lock (&count_lock) @@ -2945,16 +2945,14 @@ header_msgid_generate (void) #define COUNT_UNLOCK() #endif /* ENABLE_THREADS */ static gint count = 0; - gint hrv, drv; + gint hrv; char *ret; hrv = gethostname (host, sizeof (host)); - drv = getdomainname (domain, sizeof (domain)); COUNT_LOCK (); - ret = g_strdup_printf ("%d.%d.%d.camel@%s.%s", (gint) time (NULL), getpid (), count++, - (hrv == 0 && host && *host) ? host : "unknown.host", - (drv && domain && *domain) ? domain : "unknown.domain"); + ret = g_strdup_printf ("%d.%d.%d.camel@%s", (gint) time (NULL), getpid (), count++, + (hrv == 0 && host && *host) ? host : "unknown.host"); COUNT_UNLOCK (); return ret; -- cgit