]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
These flag tests were illogical. They were testing sip_peer flags on a sip_pvt.
authorMark Michelson <mmichelson@digium.com>
Wed, 23 Jan 2008 16:18:04 +0000 (16:18 +0000)
committerMark Michelson <mmichelson@digium.com>
Wed, 23 Jan 2008 16:18:04 +0000 (16:18 +0000)
Thanks to Russell for helping to get this odd problem figured out.

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

channels/chan_sip.c

index f09c725483d30a0a62455f7c79f9ae59fdb76a18..779633b3d2c3dc2619cee0ba0a8f28cba6a809a5 100644 (file)
@@ -3220,7 +3220,7 @@ static int update_call_counter(struct sip_pvt *fup, int event)
                        if (ast_test_flag(&fup->flags[1], SIP_PAGE2_INC_RINGING)) {
                                if (*inringing > 0)
                                        (*inringing)--;
-                               else if (!ast_test_flag(&fup->flags[0], SIP_REALTIME) || ast_test_flag(&fup->flags[1], SIP_PAGE2_RTCACHEFRIENDS))
+                               else if (!ast_test_flag(&p->flags[0], SIP_REALTIME) || ast_test_flag(&p->flags[1], SIP_PAGE2_RTCACHEFRIENDS))
                                        ast_log(LOG_WARNING, "Inringing for peer '%s' < 0?\n", fup->peername);
                                ast_clear_flag(&fup->flags[1], SIP_PAGE2_INC_RINGING);
                        }
@@ -3265,7 +3265,7 @@ static int update_call_counter(struct sip_pvt *fup, int event)
                        if (ast_test_flag(&fup->flags[1], SIP_PAGE2_INC_RINGING)) {
                                if (*inringing > 0)
                                        (*inringing)--;
-                               else if (!ast_test_flag(&fup->flags[0], SIP_REALTIME) || ast_test_flag(&fup->flags[1], SIP_PAGE2_RTCACHEFRIENDS))
+                               else if (!ast_test_flag(&p->flags[0], SIP_REALTIME) || ast_test_flag(&p->flags[1], SIP_PAGE2_RTCACHEFRIENDS))
                                        ast_log(LOG_WARNING, "Inringing for peer '%s' < 0?\n", p->name);
                                ast_clear_flag(&fup->flags[1], SIP_PAGE2_INC_RINGING);
                        }