aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1999-07-29 08:26:11 +0800
committerArturo Espinosa <unammx@src.gnome.org>1999-07-29 08:26:11 +0800
commit094deb7bca96f1dcf97952b93a7c4745cd799ebc (patch)
treef69e8fa8355218e37d08f0914f353a96da0b84fd /calendar/pcs
parentc2c3a8ce6a51126ce0a5f368801b9af33372fb79 (diff)
downloadgsoc2013-evolution-094deb7bca96f1dcf97952b93a7c4745cd799ebc.tar
gsoc2013-evolution-094deb7bca96f1dcf97952b93a7c4745cd799ebc.tar.gz
gsoc2013-evolution-094deb7bca96f1dcf97952b93a7c4745cd799ebc.tar.bz2
gsoc2013-evolution-094deb7bca96f1dcf97952b93a7c4745cd799ebc.tar.lz
gsoc2013-evolution-094deb7bca96f1dcf97952b93a7c4745cd799ebc.tar.xz
gsoc2013-evolution-094deb7bca96f1dcf97952b93a7c4745cd799ebc.tar.zst
gsoc2013-evolution-094deb7bca96f1dcf97952b93a7c4745cd799ebc.zip
Lots of more work on the sync stuff. It works pretty well now.
Lots of more work on the sync stuff. It works pretty well now. I dont know why my pilot is not accepting the events I send to it though Miguel. svn path=/trunk/; revision=1040
Diffstat (limited to 'calendar/pcs')
-rw-r--r--calendar/pcs/calobj.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/calendar/pcs/calobj.c b/calendar/pcs/calobj.c
index 08c8d8c63a..f1bec05c2b 100644
--- a/calendar/pcs/calobj.c
+++ b/calendar/pcs/calobj.c
@@ -18,23 +18,28 @@
static char *
ical_gen_uid (void)
{
- static char *domain;
+ static char *hostname;
time_t t = time (NULL);
+ static int serial;
- if (!domain){
+ if (!hostname){
char buffer [128];
- getdomainname (buffer, sizeof (buffer)-1);
- domain = g_strdup (domain);
+ gethostname (buffer, sizeof (buffer)-1);
+ if (hostname)
+ hostname = g_strdup (hostname);
+ else
+ hostname = g_strdup ("localhost");
}
return g_strdup_printf (
- "%s-%d-%d-%d@%s",
+ "%s-%d-%d-%d-%d@%s",
isodate_from_time_t (t),
getpid (),
getgid (),
getppid (),
- domain);
+ serial++,
+ hostname);
}
iCalObject *