res_pjsip_session: Fix cherry pick to master compile error.
[asterisk/asterisk.git] / res / res_pjsip / pjsip_outbound_auth.c
index 28ca3ec..8b39b00 100644 (file)
@@ -63,7 +63,7 @@ static pj_bool_t outbound_auth(pjsip_rx_data *rdata)
                return PJ_FALSE;
        }
 
-       if (ast_sip_create_request_with_auth(&endpoint->outbound_auths, rdata, tsx, &tdata)) {
+       if (ast_sip_create_request_with_auth(&endpoint->outbound_auths, rdata, tsx->last_tx, &tdata)) {
                return PJ_FALSE;
        }
 
@@ -91,6 +91,11 @@ int ast_sip_dialog_setup_outbound_authentication(pjsip_dialog *dlg, const struct
        return 0;
 }
 
-int ast_sip_initialize_outbound_authentication(void) {
-       return ast_sip_register_service(&outbound_auth_mod);
+int internal_sip_initialize_outbound_authentication(void) {
+       return internal_sip_register_service(&outbound_auth_mod);
+}
+
+
+void internal_sip_destroy_outbound_authentication(void) {
+       internal_sip_unregister_service(&outbound_auth_mod);
 }