aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-utils.c
diff options
context:
space:
mode:
authorRadek Doulik <rodo@helixcode.com>2000-11-22 23:50:10 +0800
committerRadek Doulik <rodo@src.gnome.org>2000-11-22 23:50:10 +0800
commit982a078d512dd6b4b49cd669915d72a131412c56 (patch)
treef03d3665f5ee87184be0cccda3fc4c5d60ee9d94 /camel/camel-mime-utils.c
parent622ea8d512d64d4f39929d0569698c3aab73dcdb (diff)
downloadgsoc2013-evolution-982a078d512dd6b4b49cd669915d72a131412c56.tar
gsoc2013-evolution-982a078d512dd6b4b49cd669915d72a131412c56.tar.gz
gsoc2013-evolution-982a078d512dd6b4b49cd669915d72a131412c56.tar.bz2
gsoc2013-evolution-982a078d512dd6b4b49cd669915d72a131412c56.tar.lz
gsoc2013-evolution-982a078d512dd6b4b49cd669915d72a131412c56.tar.xz
gsoc2013-evolution-982a078d512dd6b4b49cd669915d72a131412c56.tar.zst
gsoc2013-evolution-982a078d512dd6b4b49cd669915d72a131412c56.zip
check for return values
2000-11-22 Radek Doulik <rodo@helixcode.com> * camel-mime-utils.c (header_msgid_generate): check for return values svn path=/trunk/; revision=6651
Diffstat (limited to 'camel/camel-mime-utils.c')
-rw-r--r--camel/camel-mime-utils.c8
1 files changed, 5 insertions, 3 deletions
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");
}