summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/res_pjsip/presence_xml.c12
-rw-r--r--res/res_sorcery_config.c12
2 files changed, 13 insertions, 11 deletions
diff --git a/res/res_pjsip/presence_xml.c b/res/res_pjsip/presence_xml.c
index 2fe6bdc00..12bfa078c 100644
--- a/res/res_pjsip/presence_xml.c
+++ b/res/res_pjsip/presence_xml.c
@@ -16,14 +16,6 @@
* at the top of the source tree.
*/
-/*** MODULEINFO
- <depend>pjproject</depend>
- <depend>res_pjsip</depend>
- <depend>res_pjsip_pubsub</depend>
- <depend>res_pjsip_exten_state</depend>
- <support_level>core</support_level>
- ***/
-
#include "asterisk.h"
#include <pjsip.h>
@@ -31,10 +23,8 @@
#include <pjlib.h>
#include "asterisk/module.h"
-#include "asterisk/res_pjsip.h"
-#include "asterisk/res_pjsip_pubsub.h"
+#include "asterisk/pbx.h"
#include "asterisk/res_pjsip_presence_xml.h"
-#include "asterisk/res_pjsip_body_generator_types.h"
void ast_sip_sanitize_xml(const char *input, char *output, size_t len)
{
diff --git a/res/res_sorcery_config.c b/res/res_sorcery_config.c
index 60ecb8311..b6ad0ccf5 100644
--- a/res/res_sorcery_config.c
+++ b/res/res_sorcery_config.c
@@ -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))) {