]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Skinny: avoid crash with autocompletion when skinny is unloaded
authorMathieu Parent <math.parent@gmail.com>
Thu, 22 Jul 2010 19:04:18 +0000 (21:04 +0200)
committerMathieu Parent <math.parent@gmail.com>
Thu, 22 Jul 2010 19:04:18 +0000 (21:04 +0200)
src/mod/endpoints/mod_skinny/mod_skinny.c
src/mod/endpoints/mod_skinny/skinny_api.c
src/mod/endpoints/mod_skinny/skinny_api.h

index 7062bd2e4c0b05a5f2aa16ac80ba9c9a0ff05884..d27d6dc2c313467c2650258273e232a982c1d91a 100644 (file)
@@ -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);
index 25ec6da702896fbbb4a0d9b0d4f31e6851708528..79ebcfe12291f43afbbfed72c47e2f0a72d854e6 100644 (file)
@@ -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
index fc405c25150ff8e241bea0e3243ffdda17305bf1..0508fd1834742143f8e2ad2ee6023410af0ded1c 100644 (file)
@@ -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 */