add untested event changes

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@159 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2005-12-15 23:56:21 +00:00
parent b09fedf7e0
commit 033ee66fb1
1 changed files with 6 additions and 1 deletions

View File

@ -260,7 +260,12 @@ SWITCH_DECLARE(switch_status) switch_event_bind(char *id, switch_event_t event,
if (subclass_name) {
if (!(subclass = switch_core_hash_find(CUSTOM_HASH, subclass_name))) {
return SWITCH_STATUS_FALSE;
if (!(subclass = switch_core_alloc(EPOOL, sizeof(*subclass)))) {
return SWITCH_STATUS_MEMERR;
} else {
subclass->owner = switch_core_strdup(EPOOL, id);
subclass->name = switch_core_strdup(EPOOL, subclass_name);
}
}
}