[Asterisk-code-review] res pjsip outbound registration.c: Use ast sorcery object un... (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Mon Jun 22 14:15:25 CDT 2015


Richard Mudgett has uploaded a new change for review.

  https://gerrit.asterisk.org/688

Change subject: res_pjsip_outbound_registration.c: Use ast_sorcery_object_unregister() API
......................................................................

res_pjsip_outbound_registration.c: Use ast_sorcery_object_unregister() API

The sorcery pjsip 'registration' config object needs to be destroyed on
module unload.  Otherwise, a reload of res_pjsip could try to use
callbacks for the unloaded module.  Also, if
res_pjsip_outbound_registration were subsequently reloaded, the sorcery
config objects would be registered in sorcery twice.

ASTERISK-24907
Reported by: Kevin Harwell

Change-Id: I304fad13dece2604af48353f6c6d9d5c7b064697
---
M res/res_pjsip_outbound_registration.c
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/88/688/1

diff --git a/res/res_pjsip_outbound_registration.c b/res/res_pjsip_outbound_registration.c
index 78b863f..27e79bd 100644
--- a/res/res_pjsip_outbound_registration.c
+++ b/res/res_pjsip_outbound_registration.c
@@ -1775,6 +1775,8 @@
 	ast_sorcery_observer_remove(ast_sip_get_sorcery(), "auth", &observer_callbacks_auth);
 	ast_sorcery_instance_observer_remove(ast_sip_get_sorcery(), &observer_callbacks_registrations);
 
+	ast_sorcery_object_unregister(ast_sip_get_sorcery(), "registration");
+
 	ao2_global_obj_release(current_states);
 
 	return 0;

-- 
To view, visit https://gerrit.asterisk.org/688
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I304fad13dece2604af48353f6c6d9d5c7b064697
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-code-review mailing list