diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-02-10 20:15:43 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-02-10 20:15:43 +0000 |
commit | 884af3b641048d41502ff8c4af0f3004552494ba (patch) | |
tree | 828d9bc2822f32f92466d50885209a70fa8a3153 /channels | |
parent | 446fe9d06743deee7ccf8f563b2a5d05ed4e05d8 (diff) |
Only decrease inringing count if above zero.
(issue #13238)
Reported by: kowalma
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@174710 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index d932dff05..bfbdba385 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -5314,7 +5314,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); |