diff options
author | Richard Mudgett <rmudgett@digium.com> | 2013-12-03 17:35:54 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2013-12-03 17:35:54 +0000 |
commit | 3357c494cb21f24b7185ee3b255bc0cd72d48a55 (patch) | |
tree | 8a188ee6573bbf63fce7cd1b9d28a7d2d31c8047 /res/res_pjsip | |
parent | 8e8b329e14ad2e4d747c4c4eb33c118305401aee (diff) |
sorcery, bucket: Change observer remove calls to take const callbacks struct.
* Make ast_sorcery_observer_remove() accept a const callbacks struct.
* Make ast_sorcery_observer_remove() tolerant of the sorcery parameter
being NULL. Now it can be called within a module unload routine if the
sorcery initialization fails.
* Fix ast_sorcery_observer_add() to fail if the container link fails.
........
Merged revisions 403324 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_pjsip')
-rw-r--r-- | res/res_pjsip/pjsip_configuration.c | 2 | ||||
-rw-r--r-- | res/res_pjsip/pjsip_options.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c index 835dbfbf6..8ee907ba7 100644 --- a/res/res_pjsip/pjsip_configuration.c +++ b/res/res_pjsip/pjsip_configuration.c @@ -92,7 +92,7 @@ static void persistent_endpoint_contact_observer(const void *object) } /*! \brief Observer for contacts so state can be updated on respective endpoints */ -static struct ast_sorcery_observer state_contact_observer = { +static const struct ast_sorcery_observer state_contact_observer = { .created = persistent_endpoint_contact_observer, .deleted = persistent_endpoint_contact_observer, }; diff --git a/res/res_pjsip/pjsip_options.c b/res/res_pjsip/pjsip_options.c index c8c784368..8d46eb036 100644 --- a/res/res_pjsip/pjsip_options.c +++ b/res/res_pjsip/pjsip_options.c @@ -441,7 +441,7 @@ static void contact_deleted(const void *obj) } } -struct ast_sorcery_observer contact_observer = { +static const struct ast_sorcery_observer contact_observer = { .created = contact_created, .deleted = contact_deleted }; |