From: Alexander Traud Date: Thu, 17 May 2018 06:58:43 +0000 (+0200) Subject: res_pjsip_endpoint_identifier_ip: Unregister the module for headers. X-Git-Tag: 13.22.0-rc1~56^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b615df06d3ff68150e9e7fd8acc43ae8131767a7;p=thirdparty%2Fasterisk.git res_pjsip_endpoint_identifier_ip: Unregister the module for headers. Asterisk uses Reference Counting to track whether a module can be unloaded. Every consumer who requires a module, increases the reference count. When the consumer goes, is unloaded itself, it has to decrease the reference count on all its used/required modules. That way core stop gracefully works on the command-line interface (CLI): One module after the other is unloaded. A recent change broke this for the module res_pjsip. ASTERISK-27861 Change-Id: I261abcb411d026bbb0691cc78f28300bfd3103a3 --- diff --git a/res/res_pjsip_endpoint_identifier_ip.c b/res/res_pjsip_endpoint_identifier_ip.c index 50ac1571e1..e737b6f59d 100644 --- a/res/res_pjsip_endpoint_identifier_ip.c +++ b/res/res_pjsip_endpoint_identifier_ip.c @@ -768,6 +768,7 @@ static int unload_module(void) ast_cli_unregister_multiple(cli_identify, ARRAY_LEN(cli_identify)); ast_sip_unregister_cli_formatter(cli_formatter); ast_sip_unregister_endpoint_formatter(&endpoint_identify_formatter); + ast_sip_unregister_endpoint_identifier(&header_identifier); ast_sip_unregister_endpoint_identifier(&ip_identifier); return 0;