]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix MODENDP-196
authorBrian West <brian@freeswitch.org>
Mon, 9 Mar 2009 16:36:56 +0000 (16:36 +0000)
committerBrian West <brian@freeswitch.org>
Mon, 9 Mar 2009 16:36:56 +0000 (16:36 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12535 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_loadable_module.c

index 620700f41873754ba61a6e3cb572f2eb5f286f16..e5de58384464433fad6afcb37d4f0089c7e18bf2 100644 (file)
@@ -433,6 +433,11 @@ static switch_status_t switch_loadable_module_unprocess(switch_loadable_module_t
                 }
 
                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Deleting Endpoint '%s'\n", ptr->interface_name);
+                               if (switch_event_create(&event, SWITCH_EVENT_MODULE_UNLOAD) == SWITCH_STATUS_SUCCESS) {
+                                       switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "type", "endpoint");
+                                       switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "name", ptr->interface_name);
+                                       switch_event_fire(&event);
+                               }
                                switch_core_hash_delete(loadable_modules.endpoint_hash, ptr->interface_name);
                        }
                }