From: Mathieu Parent Date: Thu, 22 Jul 2010 19:04:18 +0000 (+0200) Subject: Skinny: avoid crash with autocompletion when skinny is unloaded X-Git-Tag: v1.2-rc1~526^2~125 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db1289dfafcca0e7bb92748ce01c55a0be624ae1;p=thirdparty%2Ffreeswitch.git Skinny: avoid crash with autocompletion when skinny is unloaded --- diff --git a/src/mod/endpoints/mod_skinny/mod_skinny.c b/src/mod/endpoints/mod_skinny/mod_skinny.c index 7062bd2e4c..d27d6dc2c3 100644 --- a/src/mod/endpoints/mod_skinny/mod_skinny.c +++ b/src/mod/endpoints/mod_skinny/mod_skinny.c @@ -2031,6 +2031,8 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_skinny_shutdown) switch_mutex_t *mutex = globals.mutex; int sanity = 0; + skinny_api_unregister(); + /* release events */ switch_event_unbind(&globals.heartbeat_node); switch_event_unbind(&globals.call_state_node); diff --git a/src/mod/endpoints/mod_skinny/skinny_api.c b/src/mod/endpoints/mod_skinny/skinny_api.c index 25ec6da702..79ebcfe122 100644 --- a/src/mod/endpoints/mod_skinny/skinny_api.c +++ b/src/mod/endpoints/mod_skinny/skinny_api.c @@ -460,6 +460,13 @@ switch_status_t skinny_api_register(switch_loadable_module_interface_t **module_ return SWITCH_STATUS_SUCCESS; } +switch_status_t skinny_api_unregister() +{ + switch_console_set_complete("del skinny"); + + return SWITCH_STATUS_SUCCESS; +} + /* For Emacs: * Local Variables: * mode:c diff --git a/src/mod/endpoints/mod_skinny/skinny_api.h b/src/mod/endpoints/mod_skinny/skinny_api.h index fc405c2515..0508fd1834 100644 --- a/src/mod/endpoints/mod_skinny/skinny_api.h +++ b/src/mod/endpoints/mod_skinny/skinny_api.h @@ -34,6 +34,7 @@ #define _SKINNY_API_H switch_status_t skinny_api_register(switch_loadable_module_interface_t **module_interface); +switch_status_t skinny_api_unregister(); #endif /* _SKINNY_API_H */