From: Sebastian B. <sb...@us...> - 2013-12-24 08:53:50
|
Update of /cvsroot/simplemail/simplemail/gtk In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv28233/gtk Modified Files: subthreads.c Log Message: Function thread_get() should now also work for the main thread. Index: subthreads.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/gtk/subthreads.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- subthreads.c 24 Dec 2013 08:53:28 -0000 1.22 +++ subthreads.c 24 Dec 2013 08:53:47 -0000 1.23 @@ -84,6 +84,7 @@ socketpair(PF_LOCAL,SOCK_DGRAM,0,sockets); + main_thread.thread = g_thread_self(); return 1; } @@ -316,6 +317,9 @@ struct thread_s *t; GThread *gt = g_thread_self(); + if (gt == main_thread.thread) + return &main_thread; + g_mutex_lock(thread_list_mutex); t = (struct thread_s*)list_first(&thread_list); while (t) |