From 346b766917f8b540ed182aa25fd4757f8059b40a Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Tue, 10 Feb 2009 20:16:57 +0000 Subject: [PATCH] Merged revisions 174710 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r174710 | file | 2009-02-10 16:15:43 -0400 (Tue, 10 Feb 2009) | 4 lines Only decrease inringing count if above zero. (issue #13238) Reported by: kowalma ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@174711 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 72d59360ce..39b4559f43 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4643,7 +4643,9 @@ static int update_call_counter(struct sip_pvt *fup, int event) sip_pvt_lock(fup); ast_mutex_lock(pu_lock); if (ast_test_flag(&fup->flags[0], SIP_INC_RINGING)) { - (*inringing)--; + if (*inringing > 0) { + (*inringing)--; + } ast_clear_flag(&fup->flags[0], SIP_INC_RINGING); } ast_mutex_unlock(pu_lock);