]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add untested event changes
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 15 Dec 2005 23:56:21 +0000 (23:56 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 15 Dec 2005 23:56:21 +0000 (23:56 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@159 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_event.c

index 4fc79b6a6dcfd053ea912bf2c93ffc48b8f5463c..7ee9325ba35df3dd1a5b5c7b2990972e149dae7e 100644 (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);
+                       }
                }
        }