From e3b226db74ed298ef67e0f2a9683197944ba5c8e Mon Sep 17 00:00:00 2001 From: hiro Date: Thu, 8 Oct 2009 07:08:23 +0000 Subject: fixed compilation without thread support. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2277 ee746299-78ed-0310-b773-934348b2243d --- ChangeLog | 5 +++++ libsylph/imap.c | 2 ++ src/query_search.c | 11 ++++++----- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index c50e36f2..7983e983 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-10-08 + + * libsylph/imap.c + src/query_search.c: fixed compilation without thread support. + 2009-10-08 * src/query_search.c: execute query search in another thread. diff --git a/libsylph/imap.c b/libsylph/imap.c index b7b7e55d..198bbc72 100644 --- a/libsylph/imap.c +++ b/libsylph/imap.c @@ -2640,7 +2640,9 @@ static gint imap_get_uncached_messages_func(IMAPSession *session, gpointer data) return IMAP_ERROR; } +#if USE_THREADS ((IMAPRealSession *)session)->prog_total = exists; +#endif str = g_string_new(NULL); diff --git a/src/query_search.c b/src/query_search.c index 770463ca..17755555 100644 --- a/src/query_search.c +++ b/src/query_search.c @@ -589,7 +589,6 @@ static void query_search_folder_show_progress(QueryData *data) #endif } -#if USE_THREADS static gpointer query_search_folder_func(gpointer data) { QueryData *qdata = (QueryData *)data; @@ -666,15 +665,16 @@ static gpointer query_search_folder_func(gpointer data) return GINT_TO_POINTER(0); } -#endif static void query_search_folder(FolderItem *item) { - GThread *thread; gchar *str; QueryData data = {item}; +#if USE_THREADS + GThread *thread; gint prev_count = 0; MsgInfo *msginfo; +#endif if (!item->path || item->stype == F_VIRTUAL) return; @@ -718,12 +718,13 @@ static void query_search_folder(FolderItem *item) g_thread_join(thread); debug_print("query_search_folder: thread exited\n"); -#else + + g_async_queue_free(data.queue); +#else /* !USE_THREADS */ query_search_folder_func(&data); #endif procmsg_set_auto_decrypt_message(TRUE); - g_free(data.folder_name); } -- cgit v1.2.3