From: S <s...@ka...> - 2004-03-01 18:55:16
|
Hi Steve, I become aware you are the iaxclient project admin. 1) question Maybe you are versed with th iaxclient_lib.c code and I like to ask direct a question about the "int service_audio()" function. This code is in service_audio : for(;;) { toRead = 160; if ( audio.input(&audio,buf,&toRead)) { iaxc_usermsg(IAXC_ERROR, "ERROR reading audio\n"); break; } if ( ! toRead) break; /* frame not available */ /* currently, pa will always give us 0 or what we asked * for samples */ else send_encoded_audio( &calls[selected_call], buf, iEncodeType); } My IAX client didn't get out of the "for" loop, because there is every time data on the input channel. For this reason my iaxc_processor thread hang in the service_audio function and is not able to do other work (iaxc_service_network, iaxc_do_pings....). If I remove the endless "for" loop out of service_audio my client is able to work. I didn't understand why I am the only one who run into this endless loop ? Any comment's what I have done wrong ? ------------------------------------------------------------ 2) question A other question I have is about CVS in this project. Why are no CVS tags in the source files ($Revision: $ ,$Author: $, $Log: $) this help for a better overview. A big question about the IAX2 protocol will be send later. ;-)) Regards Stephan PS : The number of Steve's in a project should be a number between 1 and 42 S wrote: > Hi All, > > in the iaxclient_lib.c the function void iaxc_shutdown() has a MUTEX > deadlock. > In the function iaxc_shutdown() is a call to iaxc_dump_all_calls() > which also try to get the MUTEX iaxc_lock. > > Dead lock code : > void iaxc_shutdown(){ > MUTEXLOCK(&iaxc_lock); > iaxc_dump_all_calls(); > > audio.destroy(&audio); > > MUTEXUNLOCK(&iaxc_lock); > MUTEXDESTROY(&iaxc_lock); > } > > FIX : No Dead lock : > > void iaxc_shutdown() > { > iaxc_dump_all_calls(); > > MUTEXLOCK(&iaxc_lock); > > audio.destroy(&audio); > > MUTEXUNLOCK(&iaxc_lock); > MUTEXDESTROY(&iaxc_lock); > } > > Regard's > > Stephan Thanks, Stephan. That's a good change, although I think there may be other bugs in iaxc_shutdown. (I don't think most clients are using it right now?). -SteveK P.S. I guess that adds to the number of Steve's in the project again, eh? |