]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-9412 [switch_loadable_module.c] Make MODULE_UNLOAD event report module name (key...
authorAndy Newlands <andynewlands@gmail.com>
Tue, 8 Nov 2016 15:46:50 +0000 (15:46 +0000)
committerAndy Newlands <andynewlands@gmail.com>
Tue, 8 Nov 2016 15:46:50 +0000 (15:46 +0000)
Add key and filename for symetry with SWITCH_EVENT_MODULE_LOAD, for api_interface, and to make it simpler to know which module is unloaded

FS-9412 #resolve

src/switch_loadable_module.c

index ba8a1c4a7572ac518150d96e1c761e90be637733..c541193158149da50e63939f8a995799954f36a1 100644 (file)
@@ -1124,6 +1124,8 @@ static switch_status_t switch_loadable_module_unprocess(switch_loadable_module_t
                                        switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "name", ptr->interface_name);
                                        switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "description", switch_str_nil(ptr->desc));
                                        switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "syntax", switch_str_nil(ptr->syntax));
+                                       switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "key", old_module->key);
+                                       switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "filename", old_module->filename);
                                        switch_event_fire(&event);
                                        removed++;
                                }