Merged revisions 49831 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Sun, 7 Jan 2007 21:26:43 +0000 (21:26 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Sun, 7 Jan 2007 21:26:43 +0000 (21:26 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49831 | tilghman | 2007-01-07 15:24:04 -0600 (Sun, 07 Jan 2007) | 2 lines

Second condition was a subset of the first, so hold was never decremented, thus hint stayed stuck (Issue 8747)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49832 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 16d9c4b..f51ea94 100644 (file)
@@ -8177,7 +8177,7 @@ static void sip_peer_hold(struct sip_pvt *p, int hold)
        /* If they put someone on hold, increment the value... otherwise decrement it */
        if (hold)
                peer->onHold++;
        /* If they put someone on hold, increment the value... otherwise decrement it */
        if (hold)
                peer->onHold++;
-       else if (hold > 0)
+       else
                peer->onHold--;
 
        /* Request device state update */
                peer->onHold--;
 
        /* Request device state update */