diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2009-10-02 04:45:08 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2009-10-02 04:45:08 +0000 |
commit | 7fbfd588baf736f4f253b7c126348e21a3cd4591 (patch) | |
tree | 8b5d20bdb41ba51a89ec08ea650196642c5212c7 /src/syldap.c | |
parent | 7a7ab0907191055a1e94ffb441992187fd13cb34 (diff) |
added missing locks on idle callbacks.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2267 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/syldap.c')
-rw-r--r-- | src/syldap.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/syldap.c b/src/syldap.c index 036ea643..8e7bea9c 100644 --- a/src/syldap.c +++ b/src/syldap.c @@ -641,7 +641,9 @@ static gboolean syldap_display_search_results(SyldapServer *ldapServer) { /* NOTE: when this function is called the accompanying thread should * already be terminated. */ + gdk_threads_enter(); ldapServer->callBack(ldapServer); + gdk_threads_leave(); /* FIXME: match should know whether to free this SyldapServer stuff. */ g_free(ldapServer->thread); ldapServer->thread = NULL; @@ -673,11 +675,7 @@ gint syldap_read_data( SyldapServer *ldapServer ) { ldapServer->busyFlag = FALSE; if( ldapServer->callBack ) { /* make the ui thread update the search results */ - /* TODO: really necessary to call gdk_threads_XXX()??? gtk_idle_add() - * should do this - could someone check the GTK sources please? */ - gdk_threads_enter(); - ldapServer->idleId = gtk_idle_add((GtkFunction)syldap_display_search_results, ldapServer); - gdk_threads_leave(); + ldapServer->idleId = g_idle_add((GSourceFunc)syldap_display_search_results, ldapServer); } return ldapServer->retVal; |