res_pjsip_session: Fix cherry pick to master compile error.
authorRichard Mudgett <rmudgett@digium.com>
Tue, 2 Jun 2015 17:55:57 +0000 (12:55 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 2 Jun 2015 18:09:12 +0000 (13:09 -0500)
ASTERISK-25131
Reported by: Richard Mudgett

Change-Id: I87c9c96ae4a8fe2bc8a0ddea6958a2ad9cefd8e3

res/res_pjsip_session.c

index ca89d76..91e3abe 100644 (file)
@@ -1467,8 +1467,8 @@ static pj_bool_t outbound_invite_auth(pjsip_rx_data *rdata)
 
        session = inv->mod_data[session_module.id];
 
-       if (ast_sip_create_request_with_auth(&session->endpoint->outbound_auths, rdata, tsx,
-               &tdata)) {
+       if (ast_sip_create_request_with_auth(&session->endpoint->outbound_auths, rdata,
+               tsx->last_tx, &tdata)) {
                return PJ_FALSE;
        }
 
@@ -2370,7 +2370,7 @@ static void session_inv_on_tsx_state_changed(pjsip_inv_session *inv, pjsip_trans
                                                if ((tsx->status_code == 401 || tsx->status_code == 407)
                                                        && !ast_sip_create_request_with_auth(
                                                                &session->endpoint->outbound_auths,
-                                                               e->body.tsx_state.src.rdata, tsx, &tdata)) {
+                                                               e->body.tsx_state.src.rdata, tsx->last_tx, &tdata)) {
                                                        /* Send authed reINVITE */
                                                        ast_sip_session_send_request_with_cb(session, tdata, cb);
                                                        return;
@@ -2407,7 +2407,7 @@ static void session_inv_on_tsx_state_changed(pjsip_inv_session *inv, pjsip_trans
                                        if ((tsx->status_code == 401 || tsx->status_code == 407)
                                                && !ast_sip_create_request_with_auth(
                                                        &session->endpoint->outbound_auths,
-                                                       e->body.tsx_state.src.rdata, tsx, &tdata)) {
+                                                       e->body.tsx_state.src.rdata, tsx->last_tx, &tdata)) {
                                                /* Send authed version of the method */
                                                ast_sip_session_send_request_with_cb(session, tdata, cb);
                                                return;