aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog5
-rw-r--r--camel/camel-mime-utils.c8
2 files changed, 10 insertions, 3 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index d5766dd0f2..e80ff42226 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,8 @@
+2000-11-22 Radek Doulik <rodo@helixcode.com>
+
+ * camel-mime-utils.c (header_msgid_generate): check for return
+ values
+
2000-11-21 Dan Winship <danw@helixcode.com>
* camel-lock.c:
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index f57b876e67..4fa150ae2a 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -3104,10 +3104,12 @@ header_msgid_generate (void)
{
gchar host [256], domain [768];
static gint count = 0;
+ gint hrv, drv;
- gethostname (host, sizeof (host));
- getdomainname (domain, sizeof (domain));
+ hrv = gethostname (host, sizeof (host));
+ drv = getdomainname (domain, sizeof (domain));
return g_strdup_printf ("%d.%d.%d.camel@%s.%s", (gint) time (NULL), getpid (), count++,
- (host && *host) ? host : "unknown.host", (domain && *domain) ? domain : "unknown.domain");
+ (hrv == 0 && host && *host) ? host : "unknown.host",
+ (drv && domain && *domain) ? domain : "unknown.domain");
}