Skinny: avoid crash with autocompletion when skinny is unloaded

This commit is contained in:
Mathieu Parent 2010-07-22 21:04:18 +02:00
parent d2a29d2c4c
commit db1289dfaf
3 changed files with 10 additions and 0 deletions

View File

@ -2031,6 +2031,8 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_skinny_shutdown)
switch_mutex_t *mutex = globals.mutex; switch_mutex_t *mutex = globals.mutex;
int sanity = 0; int sanity = 0;
skinny_api_unregister();
/* release events */ /* release events */
switch_event_unbind(&globals.heartbeat_node); switch_event_unbind(&globals.heartbeat_node);
switch_event_unbind(&globals.call_state_node); switch_event_unbind(&globals.call_state_node);

View File

@ -460,6 +460,13 @@ switch_status_t skinny_api_register(switch_loadable_module_interface_t **module_
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} }
switch_status_t skinny_api_unregister()
{
switch_console_set_complete("del skinny");
return SWITCH_STATUS_SUCCESS;
}
/* For Emacs: /* For Emacs:
* Local Variables: * Local Variables:
* mode:c * mode:c

View File

@ -34,6 +34,7 @@
#define _SKINNY_API_H #define _SKINNY_API_H
switch_status_t skinny_api_register(switch_loadable_module_interface_t **module_interface); switch_status_t skinny_api_register(switch_loadable_module_interface_t **module_interface);
switch_status_t skinny_api_unregister();
#endif /* _SKINNY_API_H */ #endif /* _SKINNY_API_H */