aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/bbdb/bbdb.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-11-06 23:20:46 +0800
committerMilan Crha <mcrha@redhat.com>2012-11-06 23:21:37 +0800
commit704b78d23bf8d707707411608a3453250f2637a1 (patch)
tree6bea89936534973c9b467503d198245f5035bc77 /plugins/bbdb/bbdb.c
parentb6fddaaa0efb8013c526f00926830b9cdcbe0d60 (diff)
downloadgsoc2013-evolution-704b78d23bf8d707707411608a3453250f2637a1.tar
gsoc2013-evolution-704b78d23bf8d707707411608a3453250f2637a1.tar.gz
gsoc2013-evolution-704b78d23bf8d707707411608a3453250f2637a1.tar.bz2
gsoc2013-evolution-704b78d23bf8d707707411608a3453250f2637a1.tar.lz
gsoc2013-evolution-704b78d23bf8d707707411608a3453250f2637a1.tar.xz
gsoc2013-evolution-704b78d23bf8d707707411608a3453250f2637a1.tar.zst
gsoc2013-evolution-704b78d23bf8d707707411608a3453250f2637a1.zip
Replace deprecated GLib symbols (as of GLib 2.34.x)
Diffstat (limited to 'plugins/bbdb/bbdb.c')
-rw-r--r--plugins/bbdb/bbdb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/bbdb/bbdb.c b/plugins/bbdb/bbdb.c
index e0d3ca3e91..b06d168fed 100644
--- a/plugins/bbdb/bbdb.c
+++ b/plugins/bbdb/bbdb.c
@@ -192,12 +192,13 @@ bbdb_do_thread (const gchar *name,
* care of that, thus just add it to the queue */
todo = g_slist_append (todo, td);
} else {
+ GThread *thread;
GError *error = NULL;
EBookClient *client = bbdb_create_book_client (AUTOMATIC_CONTACTS_ADDRESSBOOK);
/* list was empty, add item and create a thread */
todo = g_slist_append (todo, td);
- g_thread_create (bbdb_do_in_thread, client, FALSE, &error);
+ thread = g_thread_try_new (NULL, bbdb_do_in_thread, client, &error);
if (error) {
g_warning ("%s: Creation of the thread failed with error: %s", G_STRFUNC, error->message);
@@ -206,6 +207,8 @@ bbdb_do_thread (const gchar *name,
G_UNLOCK (todo);
bbdb_do_in_thread (client);
G_LOCK (todo);
+ } else {
+ g_thread_unref (thread);
}
}
G_UNLOCK (todo);