From 8fc9ea25ab1c0e153ff27acd7f5b36dad1b2f02e Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Tue, 10 Feb 2009 20:17:43 +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.1@174714 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 1c6e196f84..747be56d28 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4887,7 +4887,9 @@ static int update_call_counter(struct sip_pvt *fup, int event) sip_pvt_lock(fup); ao2_lock(p); if (ast_test_flag(&fup->flags[0], SIP_INC_RINGING)) { - (*inringing)--; + if (*inringing > 0) { + (*inringing)--; + } ast_clear_flag(&fup->flags[0], SIP_INC_RINGING); } ao2_unlock(p);