From: Kinsey Moore Date: Wed, 6 Jun 2012 16:07:02 +0000 (+0000) Subject: Ensure overlapping hold flags do not conflict X-Git-Tag: 1.8.14.0-rc1~3^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b563128877a3ac0a058eda6f67e767e7f76711e3;p=thirdparty%2Fasterisk.git Ensure overlapping hold flags do not conflict When changing between different modes of hold, the flags were not being cleared out properly causing a failure to change hold states. (closes issue ASTERISK-19919) Patch-by: Morten Tryfoss Reported-by: Morten Tryfoss git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@368586 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 30cb839af2..22d3b763c3 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -8675,6 +8675,9 @@ static void change_hold_state(struct sip_pvt *dialog, struct sip_request *req, i } /* No address for RTP, we're on hold */ + /* Ensure hold flags are cleared so that overlapping flags do not conflict */ + ast_clear_flag(&dialog->flags[1], SIP_PAGE2_CALL_ONHOLD); + if (sendonly == 1) /* One directional hold (sendonly/recvonly) */ ast_set_flag(&dialog->flags[1], SIP_PAGE2_CALL_ONHOLD_ONEDIR); else if (sendonly == 2) /* Inactive stream */