diff options
author | Radek Doulik <rodo@helixcode.com> | 2000-11-22 23:50:10 +0800 |
---|---|---|
committer | Radek Doulik <rodo@src.gnome.org> | 2000-11-22 23:50:10 +0800 |
commit | 982a078d512dd6b4b49cd669915d72a131412c56 (patch) | |
tree | f03d3665f5ee87184be0cccda3fc4c5d60ee9d94 /camel/camel-mime-utils.c | |
parent | 622ea8d512d64d4f39929d0569698c3aab73dcdb (diff) | |
download | gsoc2013-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.c | 8 |
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"); } |