aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/backend/pas/pas-backend-file.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/addressbook/backend/pas/pas-backend-file.c b/addressbook/backend/pas/pas-backend-file.c
index 94c87f655b..e117fe8b05 100644
--- a/addressbook/backend/pas/pas-backend-file.c
+++ b/addressbook/backend/pas/pas-backend-file.c
@@ -9,6 +9,7 @@
#include "config.h"
#include <gtk/gtksignal.h>
#include <fcntl.h>
+#include <time.h>
#ifdef HAVE_DB_185_H
#include <db_185.h>
#else
@@ -92,7 +93,11 @@ string_to_dbt(const char *str, DBT *dbt)
static char *
pas_backend_file_create_unique_id (char *vcard)
{
- return g_strdup ("foo"); /* XXX create unique id here */
+ /* use a 32 counter and the 32 bit timestamp to make an id.
+ it's doubtful 2^32 id's will be created in a second, so we
+ should be okay. */
+ static guint c = 0;
+ return g_strdup_printf ("pas-id-%08lX%08X", time(NULL), c++);
}
static void
2013-09-221-4/+4 * Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-211-0/+1 * - Update to 0.8.0miwi2013-02-187-156/+143 * -remove MD5ohauer2011-07-031-1/+0 * - Chase security/libksba shlib version bumpglarkin2010-12-161-1/+1 * - Switch SourceForge ports to the new File Release System: categories startin...amdmi32009-08-221-2/+1 * Bump portrevision due to upgrade of devel/gettext.edwin2008-06-061-0/+1 * - Update to 0.7.0.araujo2008-05-035-39/+57 d4124a1fbf52e'>KDE/FreeBSD team presents KDE SC 4.10.3 ports!makc2013-05-191-2/+2