diff options
Diffstat (limited to 'addressbook/gui/merging')
-rw-r--r-- | addressbook/gui/merging/eab-contact-compare.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/addressbook/gui/merging/eab-contact-compare.c b/addressbook/gui/merging/eab-contact-compare.c index 409b1bce81..de0c7b4675 100644 --- a/addressbook/gui/merging/eab-contact-compare.c +++ b/addressbook/gui/merging/eab-contact-compare.c @@ -617,7 +617,8 @@ use_common_book_cb (EBook *book, gpointer closure) GList *contact_email; gchar *query_parts[MAX_QUERY_PARTS]; gint p=0; - gchar *query, *qj; + gchar *qj; + EBookQuery *query = NULL; int i; if (book == NULL) { @@ -669,18 +670,21 @@ use_common_book_cb (EBook *book, gpointer closure) for(i = 0; query_parts[i] != NULL; i++) g_free(query_parts[i]); if (p > 0) { - query = g_strdup_printf ("(or %s)", qj); - g_free (qj); + char *s; + s = g_strdup_printf ("(or %s)", qj); + query = e_book_query_from_string (s); + g_free (s); } else { - query = qj; + query = e_book_query_from_string (qj); } - if (query && *query) + if (query) e_book_async_get_contacts (book, query, query_cb, info); else query_cb (book, E_BOOK_ERROR_OK, NULL, info); - g_free (query); + g_free (qj); + e_book_query_unref (query); } void |