Implement proper locking on INFO_RECEIVED
authorMark Spencer <markster@digium.com>
Thu, 17 Jun 2004 14:51:44 +0000 (14:51 +0000)
committerMark Spencer <markster@digium.com>
Thu, 17 Jun 2004 14:51:44 +0000 (14:51 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3237 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c

index c98957e..0303be1 100755 (executable)
@@ -6965,6 +6965,7 @@ static void *pri_dchannel(void *vpri)
                                } else {
                                        chanpos = pri_fixup_principle(pri, chanpos, e->ring.call);
                                        if (chanpos > -1) {
+                                               ast_mutex_lock(&pri->pvts[x]->lock);
                                                /* queue DTMF frame if the PBX for this call was already started (we're forwarding INFORMATION further on */
                                                if (pri->overlapdial && pri->pvts[chanpos]->call==e->ring.call && pri->pvts[chanpos]->owner) {
                                                        /* how to do that */
@@ -6979,6 +6980,7 @@ static void *pri_dchannel(void *vpri)
                                                                }
                                                        }
                                                }
+                                               ast_mutex_unlock(&pri->pvts[x]->lock);
                                        }
                                }
                                break;