aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
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
parent02cae09612a7c1b42d2a998b26bc061f5ecabc65 (diff)
downloadgsoc2013-evolution-1755ff603bff086a19b3fbb39adc5f8022640159.tar.gz
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')
-rw-r--r--calendar/ChangeLog4
-rw-r--r--calendar/cal-util/calobj.c6
-rw-r--r--calendar/calobj.c6
-rw-r--r--calendar/pcs/calobj.c6
4 files changed, 13 insertions, 9 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 2bb6396715..282f0871b0 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,7 @@
+1999-08-15 Miguel de Icaza <miguel@gnu.org>
+
+ * calobj.c (ical_gen_uid): Fix the hostname part.
+
1999-08-07 Peter Teichman <pat4@acpub.duke.edu>
* calendar-pilot-sync.c (sync_pilot): sync correctly for objects
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");
}
diff --git a/calendar/calobj.c b/calendar/calobj.c
index f1bec05c2b..7e1a3635db 100644
--- a/calendar/calobj.c
+++ b/calendar/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");
}
diff --git a/calendar/pcs/calobj.c b/calendar/pcs/calobj.c
index f1bec05c2b..7e1a3635db 100644
--- a/calendar/pcs/calobj.c
+++ b/calendar/pcs/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");
}
ommitgraph'>* * fix permissions:skv2005-08-192-21/+22 * - Fix PLIST for firebird-clientgarga2005-08-041-0/+1 * - Fix pkg-messagegarga2005-08-022-5/+2 * Unbreak firebird-client build - remove "chown" for "employee.fdb"skv2005-08-011-2/+0 * Change layout for firebird-server accordingly to hier(7) spirit.skv2005-07-2714-136/+176 * Take maintainership.skv2005-07-261-1/+1 * Change MAINTAINER to my @FreeBSD.org accountgarga2005-07-121-1/+1 * Unbreak firebird-client (firebird-server seems to be still broken):skv2005-05-235-51/+52 * - Fix problem with firebird.conf. It was not installed.sem2005-05-217-125/+133 * - Fix maintainer email that was violented on last commitsem2005-05-191-1/+1 * - Split databases/firebird in -client and -server portssem2005-05-189-329/+343 * Fix pkg-message.novel2005-05-151-1/+1 * - Don't be too smart and don't change /etc/services and /etc/inetd.confsem2005-05-013-30/+57 * Change maintainer's email address.barner2005-04-111-1/+1 * - Make portlint happyvs2005-02-151-2/+2 * Update to 1.5.2skv2005-01-103-6/+7 * Drop maintainershipkrion2004-10-121-1/+1 * Fix malformed patch.sem2004-07-261-11/+11 * Add patch to fix broken build.sem2004-07-251-0/+11 * Update to version 1.5.1krion2004-07-224-11/+13 * Sync with new bsd.autotools.mkade2004-06-051-2/+2