Small typo
authorMark Spencer <markster@digium.com>
Thu, 17 Jun 2004 04:32:10 +0000 (04:32 +0000)
committerMark Spencer <markster@digium.com>
Thu, 17 Jun 2004 04:32:10 +0000 (04:32 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3233 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c

index 417aa59..c98957e 100755 (executable)
@@ -7006,10 +7006,12 @@ static void *pri_dchannel(void *vpri)
                                                                pri_hangup_all(pri->pvts[chanpos]->master);
                                                        else
                                                                pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+                                                       ast_mutex_unlock(&pri->pvts[chanpos]->lock);
                                                        chanpos = -1;
                                                }
                                        }
-                                       ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+                                       if (chanpos > -1)
+                                               ast_mutex_unlock(&pri->pvts[chanpos]->lock);
                                }
                                if ((chanpos < 0) && (e->ring.flexible))
                                        chanpos = pri_find_empty_chan(pri, 1);