res_pjsip_outbound_registration: Clean up state when registration is deleted
authorGeorge Joseph <gjoseph@digium.com>
Mon, 16 May 2016 20:29:38 +0000 (14:29 -0600)
committerGeorge Joseph <gjoseph@digium.com>
Tue, 17 May 2016 01:44:09 +0000 (20:44 -0500)
commitae81b55361f3919706775b5a64ab8327a8edab4f
treee976ce5260653df435814999de74b70117c56b8d
parent040522100b3332af877e496ab8316993f6f02b4e
res_pjsip_outbound_registration:  Clean up state when registration is deleted

Nothing was cleaning up the registration state object when ast_sorcery_delete
was called on a registration.  So, the registration was deleted from sorcery
but the state object went right on refreshing the registration (or failing
to refresh the registration) with the peer.

* Added a 'deleted' observer on registration that removes the state object.

ASTERISK-25964 #close
Reported-by Matt Jordan

Change-Id: I2db792145cdb1f72ebbf57dd9099596dbbf12c23
res/res_pjsip_outbound_registration.c