Fix monitor thread issue.
authorJeremy McNamara <jj@nufone.net>
Tue, 13 Jan 2004 00:40:33 +0000 (00:40 +0000)
committerJeremy McNamara <jj@nufone.net>
Tue, 13 Jan 2004 00:40:33 +0000 (00:40 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1995 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_skinny.c

index 49d99a8..2c5f8d9 100755 (executable)
@@ -1899,7 +1899,7 @@ static int handle_message(skinny_req *req, struct skinnysession *s)
                        break;
                case STIMULUS_TRANSFER:
                        if (skinnydebug) {
-                               printf("Recieved Stimulus: Transfer(%d)", stimulusInstance);
+                               printf("Recieved Stimulus: Transfer(%d)\n", stimulusInstance);
                        }
                        transmit_tone(s, SKINNY_DIALTONE);
                                
@@ -2736,7 +2736,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);