SWITCH_DECLARE(switch_xml_t) switch_xml_open_root(uint8_t reload, const char **err)
{
switch_xml_t root = NULL;
+ switch_event_t *event;
switch_mutex_lock(XML_LOCK);
}
switch_mutex_unlock(XML_LOCK);
+
+ if (root) {
+ if (switch_event_create(&event, SWITCH_EVENT_RELOADXML) == SWITCH_STATUS_SUCCESS) {
+ if (switch_event_fire(&event) != SWITCH_STATUS_SUCCESS) {
+ switch_event_destroy(&event);
+ }
+ }
+ }
+
return root;
}
}
if (errcnt == 0) {
- switch_event_t *event;
- if (switch_event_create(&event, SWITCH_EVENT_RELOADXML) == SWITCH_STATUS_SUCCESS) {
- if (switch_event_fire(&event) != SWITCH_STATUS_SUCCESS) {
- switch_event_destroy(&event);
- }
- }
r = switch_xml_root();
}