[Asterisk-code-review] chan sip: Don't unload module while TCP/TLS threads are stil... (asterisk[master])

Corey Farrell asteriskteam at digium.com
Fri Dec 2 03:11:32 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 2:

> Unfortunately, if I return -1 from unload_module, I cannot load the
 > module anymore afterwards:
 > loader.c:1077 enum ast_module_load_result load_resource(...):
 > Module 'chan_sip' already exists. This happens because returning an
 > error not only results in skipping dlclose(), which we want, but
 > also it doesn't remove the running flag. Any suggestions?

Once module_unload returns -1 the module is in a weird state where it's loaded but not entirely running.  I believe you need to retry the "module unload chan_sip.so" once the TCP threads are closed.  This should rerun the unload_module function and complete the unload.

-- 
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: 2
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