]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_pjsip_t38.c: Fix always false if test. 93/793/1
authorRichard Mudgett <rmudgett@digium.com>
Fri, 26 Jun 2015 21:10:26 +0000 (16:10 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Mon, 6 Jul 2015 21:01:53 +0000 (16:01 -0500)
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

res/res_pjsip_t38.c

index 06a73cc1113fd909055bfa2081a13ca9dbb9accc..c44dc4b8806879a5405e5580c2cf68643b8c605f 100644 (file)
@@ -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) {