*** channels/chan_iax2.c.orig 2011-01-05 05:53:27.000000000 +0800 --- channels/chan_iax2.c 2011-05-09 17:13:57.000000000 +0800 *************** *** 11533,11538 **** --- 11533,11544 ---- static void iax2_process_thread_cleanup(void *data) { struct iax2_thread *thread = data; + // XXX + if (!thread->stop) + { + pthread_detach(thread->threadid); + } + // ast_mutex_destroy(&thread->lock); ast_cond_destroy(&thread->cond); ast_mutex_destroy(&thread->init_lock);