]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res/res_pjsip_outbound_registration: Apply configuration on object type load 63/1663/1
authorMatt Jordan <mjordan@digium.com>
Thu, 19 Nov 2015 15:40:24 +0000 (09:40 -0600)
committerMatt Jordan <mjordan@digium.com>
Thu, 19 Nov 2015 15:40:24 +0000 (09:40 -0600)
commit8f71263e72268bb4966fa7d8f68a0a8b99419ec5
tree538089f537c1ee24029e99b309af90858bad0c2f
parentccf80f95a21c380fb9e96a367bece411e349edb0
res/res_pjsip_outbound_registration: Apply configuration on object type load

When Asterisk is configured to use a dynamic sorcery backend (such as
res_sorcery_astdb) with 'registration' objects, it will fail to create the
internal state objects associated with the registration objects on module
load. This is due to nothing actually querying for the specific objects
and calling their sorcery apply handler during module load.

This patch fixes that by calling get_registrations in the sorcery observer's
object_type_loaded handler. Doing this causes the sorcery backends to be
asked for the current state of all registration objects, which causes the
apply handler to be called and the internal run-time state to be created.

ASTERISK-25575 #close

Change-Id: Ie9306e797098c6d4da7bcf4a5434a15891508b23
res/res_pjsip_outbound_registration.c