mirror of
https://github.com/asterisk/asterisk.git
synced 2026-05-06 05:13:49 +00:00
Merge "chan_pjsip: Creating Channel Causes Asterisk to Crash When Duplicate AOR Sections Exist in pjsip.conf"
This commit is contained in:
@@ -294,6 +294,18 @@ static void sorcery_config_internal_load(void *data, const struct ast_sorcery *s
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Confirm an object with this id does not already exist in the bucket.
|
||||
* If it exists, however, the configuration is invalid so stop
|
||||
* processing and destroy it. */
|
||||
obj = ao2_find(objects, id, OBJ_KEY;
|
||||
|
||||
if (obj) {
|
||||
ast_log(LOG_ERROR, "Config file '%s' could not be loaded; configuration contains a duplicate object: '%s' of type '%s'\n",
|
||||
config->filename, id, type);
|
||||
ast_config_destroy(cfg);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(obj = ast_sorcery_alloc(sorcery, type, id)) ||
|
||||
ast_sorcery_objectset_apply(sorcery, obj, ast_category_first(category))) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user