Add a reloadable option for sorcery type objects

Some configuration objects currently won't place nice if reloaded.
Specifically, in this case the pjsip transport objects.  Now when
registering an object in sorcery one may specify that the object is
allowed to be reloaded or not.  If the object is set to not reload
then upon reloading of the configuration the objects of that type
will not be reloaded.  The initially loaded objects of that type
however will remain.

While the transport objects will not longer be reloaded it is still
possible for a user to configure an endpoint to an invalid transport.
A couple of log messages were added to help diagnose this problem if
it occurs.

(closes issue ASTERISK-22382)
Reported by: Rusty Newton
(closes issue ASTERISK-22384)
Reported by: Rusty Newton
Review: https://reviewboard.asterisk.org/r/2807/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@398139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin Harwell
2013-08-30 19:51:48 +00:00
parent 35e44ccf9c
commit 8cc162df5e
5 changed files with 42 additions and 5 deletions

View File

@@ -1290,6 +1290,8 @@ static int sip_get_tpselector_from_endpoint(const struct ast_sip_endpoint *endpo
transport = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "transport", transport_name);
if (!transport || !transport->state) {
ast_log(LOG_ERROR, "Unable to retrieve PJSIP transport '%s' for endpoint '%s'\n",
transport_name, ast_sorcery_object_get_id(endpoint));
return -1;
}