add reloadxml event
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7775 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
78bf4a6844
commit
a3be4e8e72
|
@ -988,6 +988,7 @@ typedef enum {
|
|||
SWITCH_EVENT_DEL_SCHEDULE - Something has been unscheduled
|
||||
SWITCH_EVENT_EXE_SCHEDULE - Something scheduled has been executed
|
||||
SWITCH_EVENT_RE_SCHEDULE - Something scheduled has been rescheduled
|
||||
SWITCH_EVENT_RELOADXML - XML registry has been reloaded
|
||||
SWITCH_EVENT_ALL - All events at once
|
||||
</pre>
|
||||
|
||||
|
@ -1041,6 +1042,7 @@ typedef enum {
|
|||
SWITCH_EVENT_DEL_SCHEDULE,
|
||||
SWITCH_EVENT_EXE_SCHEDULE,
|
||||
SWITCH_EVENT_RE_SCHEDULE,
|
||||
SWITCH_EVENT_RELOADXML,
|
||||
SWITCH_EVENT_ALL
|
||||
} switch_event_types_t;
|
||||
|
||||
|
|
|
@ -126,6 +126,7 @@ static char *EVENT_NAMES[] = {
|
|||
"DEL_SCHEDULE",
|
||||
"EXE_SCHEDULE",
|
||||
"RE_SCHEDULE",
|
||||
"RELOADXML",
|
||||
"ALL"
|
||||
};
|
||||
|
||||
|
|
|
@ -1479,7 +1479,17 @@ SWITCH_DECLARE(switch_xml_t) switch_xml_open_root(uint8_t reload, const char **e
|
|||
}
|
||||
switch_mutex_unlock(XML_LOCK);
|
||||
|
||||
return errcnt == 0 ? switch_xml_root() : NULL;
|
||||
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);
|
||||
}
|
||||
}
|
||||
return switch_xml_root();
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_xml_init(switch_memory_pool_t *pool, const char **err)
|
||||
|
|
Loading…
Reference in New Issue