From: <st...@us...> - 2003-06-18 16:39:21
|
Update of /cvsroot/iaxclient/iaxclient/lib In directory sc8-pr-cvs1:/tmp/cvs-serv23009/lib Modified Files: iaxclient_lib.c Log Message: Modularize the event callback mechanism to use either PostEvent, or the Immediate processing model with GuiLock that we'd been using. The GuiLock stuff was causing the multiple register windows (on Win32 only), because the menu select event was getting processed over and over, until one of the handlers finally returned, and took it off of the event queue. With PostEvent processing for the callback, this doesn't happen anymore, because the queue isn't getting run from other threads. Also, resolve (with a hack) the hang on exit experienced with windows. Index: iaxclient_lib.c =================================================================== RCS file: /cvsroot/iaxclient/iaxclient/lib/iaxclient_lib.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- iaxclient_lib.c 17 Jun 2003 22:53:27 -0000 1.23 +++ iaxclient_lib.c 18 Jun 2003 16:39:18 -0000 1.24 @@ -251,6 +251,7 @@ } void iaxc_shutdown() { + MUTEXLOCK(&iaxc_lock); switch (iAudioType) { case AUDIO_INTERNAL: #ifdef USE_WIN_AUDIO @@ -261,6 +262,7 @@ pa_shutdown_audio(); break; } + MUTEXUNLOCK(&iaxc_lock); MUTEXDESTROY(&iaxc_lock); } @@ -337,9 +339,12 @@ if(procThreadQuitFlag >= 0) { procThreadQuitFlag = 1; - THREADJOIN(procThread); + // It will die eventually on it's own? + // causes deadlock with wx GUI on MSW.. XXX FixME? + //THREADJOIN(procThread); } procThreadQuitFlag = -1; + return 0; } |