[Asterisk-code-review] chan sip: Don't unload module while TCP/TLS threads are stil... (asterisk[master])
Corey Farrell
asteriskteam at digium.com
Wed Nov 30 14:12:24 CST 2016
Corey Farrell has posted comments on this change. ( https://gerrit.asterisk.org/4536 )
Change subject: chan_sip: Don't unload module while TCP/TLS threads are still running
......................................................................
Patch Set 1: Code-Review-1
This change introduces the potential for an infinite loop during module unload and Asterisk shutdown.
I think a better fix is to add 'int res = 0;' to the top of unload_module, set that variable to -1 if we fail to clean all TCP threads after 5 seconds. Then use 'return res;' in place of 'return 0;'. This will tell the module loader that it's not safe to dlclose the module. This should be tested to see what happens when someone tries unloading chan_sip again after unload_module returns an error. This may require other tweaks to NULL out some variables and avoid double-free.
--
To view, visit https://gerrit.asterisk.org/4536
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I23a8abf9e8f73b57ff7ada61984b8506aea6cbde
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Michael Kuron <m.kuron at gmx.de>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Michael Kuron <m.kuron at gmx.de>
Gerrit-HasComments: No
More information about the asterisk-code-review
mailing list