aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorjeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b>2004-01-12 06:01:46 +0000
committerjeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b>2004-01-12 06:01:46 +0000
commitcfc84c1ffb1ddd9af14dc7f2d146265fd3c30132 (patch)
tree1bce1a31e64851f6a320710a5ed7cbd68c0349b5 /channels
parentc2a55459af36e7207bba7605156637572f00672a (diff)
unregister cli functions and fix monitor thread. Bug #798
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1975 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_sip.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 6ce9e9bae..b43f4068c 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -6545,6 +6545,15 @@ int unload_module()
/* First, take us out of the channel loop */
ast_channel_unregister(type);
ast_unregister_application(app_dtmfmode);
+ ast_cli_unregister(&cli_show_users);
+ ast_cli_unregister(&cli_show_channels);
+ ast_cli_unregister(&cli_show_channel);
+ ast_cli_unregister(&cli_show_peers);
+ ast_cli_unregister(&cli_show_registry);
+ ast_cli_unregister(&cli_debug);
+ ast_cli_unregister(&cli_no_debug);
+ ast_cli_unregister(&cli_inuse_show);
+ ast_rtp_proto_unregister(&sip_rtp);
if (!ast_mutex_lock(&iflock)) {
/* Hangup all interfaces if they have an owner */
p = iflist;
@@ -6560,7 +6569,7 @@ int unload_module()
return -1;
}
if (!ast_mutex_lock(&monlock)) {
- if (monitor_thread) {
+ if (monitor_thread && (monitor_thread != -2)) {
pthread_cancel(monitor_thread);
pthread_kill(monitor_thread, SIGURG);
pthread_join(monitor_thread, NULL);