git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4832 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2007-04-02 20:20:46 +00:00
parent 2b76e3e72f
commit e47596fca5
4 changed files with 11 additions and 5 deletions

View File

@@ -126,6 +126,8 @@ static char *EVENT_NAMES[] = {
"PRESENCE_IN",
"PRESENCE_OUT",
"PRESENCE_PROBE",
"MESSAGE_WAITING",
"MESSAGE_QUERY",
"ROSTER",
"CODEC",
"BACKGROUND_JOB",
@@ -313,7 +315,7 @@ SWITCH_DECLARE(switch_status_t) switch_name_event(char *name, switch_event_types
assert(RUNTIME_POOL != NULL);
for (x = 0; x <= SWITCH_EVENT_ALL; x++) {
if (!strcasecmp(name, EVENT_NAMES[x])) {
if ((strlen(name) > 13 && !strcasecmp(name + 13, EVENT_NAMES[x])) || !strcasecmp(name, EVENT_NAMES[x])) {
*type = x;
return SWITCH_STATUS_SUCCESS;
}