[asterisk-commits] chan pjsip.c: Fix topology refresh response code accuracy. (asterisk[15])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Aug 25 08:51:57 CDT 2017
Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/6269 )
Change subject: chan_pjsip.c: Fix topology refresh response code accuracy.
......................................................................
chan_pjsip.c: Fix topology refresh response code accuracy.
There are other 1xx and 2xx codes than 100 and 200 respectively.
Change-Id: I680db0997343256add1478714f5bf5b5569aee17
---
M channels/chan_pjsip.c
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
Kevin Harwell: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c
index 4a24fa6..677dfd3 100644
--- a/channels/chan_pjsip.c
+++ b/channels/chan_pjsip.c
@@ -1484,14 +1484,14 @@
static int on_topology_change_response(struct ast_sip_session *session, pjsip_rx_data *rdata)
{
- if (rdata->msg_info.msg->line.status.code == 200) {
+ if (PJSIP_IS_STATUS_IN_CLASS(rdata->msg_info.msg->line.status.code, 200)) {
/* The topology was changed to something new so give notice to what requested
* it so it queries the channel and updates accordingly.
*/
if (session->channel) {
ast_queue_control(session->channel, AST_CONTROL_STREAM_TOPOLOGY_CHANGED);
}
- } else if (rdata->msg_info.msg->line.status.code != 100) {
+ } else if (300 <= rdata->msg_info.msg->line.status.code) {
/* The topology change failed, so drop the current pending media state */
ast_sip_session_media_state_reset(session->pending_media_state);
}
--
To view, visit https://gerrit.asterisk.org/6269
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: I680db0997343256add1478714f5bf5b5569aee17
Gerrit-Change-Number: 6269
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20170825/93379a0f/attachment-0001.html>
More information about the asterisk-commits
mailing list