[chan_lcr] Unloading chan_lcr is now possible
Hi,
I tried to tackle the issue that 'core stop|restart when convenient' won't
work because unloading chan_lcr does not work.
The issue is that the thread blocks in select().
I tried to move the clean-up work from after the main select loop to the
module unloading code, make that loop a real infinite loop and replaced
pthread_join() by pthred_cancel().
The result seems to work.
Proposed patch attached.
Unloading chan_lcr while it has open channels is fatal, with or without
that patch.
Greetings,
WIMPy