aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-util
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnu.org>1999-08-15 13:23:22 +0800
committerArturo Espinosa <unammx@src.gnome.org>1999-08-15 13:23:22 +0800
commit1755ff603bff086a19b3fbb39adc5f8022640159 (patch)
tree5eb06b05eee326e99e422449b579ff9180080884 /calendar/cal-util
parent02cae09612a7c1b42d2a998b26bc061f5ecabc65 (diff)
downloadgsoc2013-evolution-1755ff603bff086a19b3fbb39adc5f8022640159.tar
gsoc2013-evolution-1755ff603bff086a19b3fbb39adc5f8022640159.tar.gz
gsoc2013-evolution-1755ff603bff086a19b3fbb39adc5f8022640159.tar.bz2
gsoc2013-evolution-1755ff603bff086a19b3fbb39adc5f8022640159.tar.lz
gsoc2013-evolution-1755ff603bff086a19b3fbb39adc5f8022640159.tar.xz
gsoc2013-evolution-1755ff603bff086a19b3fbb39adc5f8022640159.tar.zst
gsoc2013-evolution-1755ff603bff086a19b3fbb39adc5f8022640159.zip
Fix the hostname part.
1999-08-15 Miguel de Icaza <miguel@gnu.org> * calobj.c (ical_gen_uid): Fix the hostname part. svn path=/trunk/; revision=1116
Diffstat (limited to 'calendar/cal-util')
-rw-r--r--calendar/cal-util/calobj.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/calendar/cal-util/calobj.c b/calendar/cal-util/calobj.c
index f1bec05c2b..7e1a3635db 100644
--- a/calendar/cal-util/calobj.c
+++ b/calendar/cal-util/calobj.c
@@ -25,9 +25,9 @@ ical_gen_uid (void)
if (!hostname){
char buffer [128];
- gethostname (buffer, sizeof (buffer)-1);
- if (hostname)
- hostname = g_strdup (hostname);
+ if ((gethostname (buffer, sizeof (buffer)-1) == 0) &&
+ (buffer [0] != 0))
+ hostname = g_strdup (buffer);
else
hostname = g_strdup ("localhost");
}