From: Anthony Minessale Date: Thu, 15 Dec 2005 23:56:21 +0000 (+0000) Subject: add untested event changes X-Git-Tag: v1.0-beta1~3556 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=033ee66fb16aa64d329b481d26adc31b0f452921;p=thirdparty%2Ffreeswitch.git add untested event changes git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@159 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/switch_event.c b/src/switch_event.c index 4fc79b6a6d..7ee9325ba3 100644 --- a/src/switch_event.c +++ b/src/switch_event.c @@ -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); + } } }