summaryrefslogtreecommitdiff
path: root/channels/chan_pjsip.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2017-08-14 12:20:25 -0500
committerRichard Mudgett <rmudgett@digium.com>2017-08-22 11:33:25 -0500
commit850a3fd0173f96dfdf5f025a0a91348863acbb62 (patch)
treea255865d9dcdf779f7da6fc0701a750e1b694722 /channels/chan_pjsip.c
parentc86619bab87d348cbcd2f3378e4b68c8cb20090b (diff)
chan_pjsip.c: Fix topology refresh response code accuracy.
There are other 1xx and 2xx codes than 100 and 200 respectively. Change-Id: I680db0997343256add1478714f5bf5b5569aee17
Diffstat (limited to 'channels/chan_pjsip.c')
-rw-r--r--channels/chan_pjsip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c
index 4a24fa689..677dfd3dd 100644
--- a/channels/chan_pjsip.c
+++ b/channels/chan_pjsip.c
@@ -1484,14 +1484,14 @@ static struct topology_change_refresh_data *topology_change_refresh_data_alloc(
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);
}