From: Richard Mudgett Date: Fri, 26 Jun 2015 21:10:26 +0000 (-0500) Subject: res_pjsip_t38.c: Fix always false if test. X-Git-Tag: 13.5.0-rc1~53^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38bace4fbb8d2c47cc38230645de2aa0769726fb;p=thirdparty%2Fasterisk.git res_pjsip_t38.c: Fix always false if test. Calling t38_change_state() sets the t38 state so it makes little sense to then check the state right after the call for something else. * Made the code in t38_interpret_parameters() reject or exit T.38 mode as intended but not implemented. Change-Id: Ib281263a6ed44da9448132c4e6df1e183b8a3df2 --- diff --git a/res/res_pjsip_t38.c b/res/res_pjsip_t38.c index 06a73cc111..c44dc4b880 100644 --- a/res/res_pjsip_t38.c +++ b/res/res_pjsip_t38.c @@ -324,9 +324,13 @@ static int t38_interpret_parameters(void *obj) case AST_T38_REQUEST_NEGOTIATE: /* Request T38 */ /* Negotiation can not take place without a valid max_ifp value. */ if (!parameters->max_ifp) { - t38_change_state(data->session, session_media, state, T38_REJECTED); if (data->session->t38state == T38_PEER_REINVITE) { + t38_change_state(data->session, session_media, state, T38_REJECTED); ast_sip_session_resume_reinvite(data->session); + } else if (data->session->t38state == T38_ENABLED) { + t38_change_state(data->session, session_media, state, T38_DISABLED); + ast_sip_session_refresh(data->session, NULL, NULL, NULL, + AST_SIP_SESSION_REFRESH_METHOD_INVITE, 1); } break; } else if (data->session->t38state == T38_PEER_REINVITE) {