Commit ec5a83b8 authored by Pekka Pessi's avatar Pekka Pessi

Including credentials to INVITE transaction, too.

darcs-hash:20060517081522-65a35-16333d8b2a1c81ba5ba16c4ddfc327011374a54c.gz
parent 752f4eaf
......@@ -257,7 +257,7 @@ ua_invite2(nua_t *nua, nua_handle_t *nh, nua_event_t e, int restarted,
if (offer_sent > 0 &&
session_include_description(nh->nh_soa, msg, sip) < 0)
sip = NULL;
sip = NULL, what = "Internal media error";
if (sip && nh->nh_soa &&
NH_PGET(nh, media_features) && !nua_dialog_is_established(nh->nh_ds) &&
......@@ -274,6 +274,10 @@ ua_invite2(nua_t *nua, nua_handle_t *nh, nua_event_t e, int restarted,
}
}
if (sip && nh->nh_auth) {
if (auc_authorize(&nh->nh_auth, msg, sip) < 0)
sip = NULL, what = "Internal authentication error";
}
if (sip)
cr->cr_orq = nta_outgoing_mcreate(nua->nua_nta,
process_response_to_invite, nh, NULL,
......
......@@ -2943,6 +2943,7 @@ int test_reject_401(struct context *ctx)
TEST_1(sip = sip_object(e->data->e_msg));
TEST_1(sip->sip_subject);
TEST_S(sip->sip_subject->g_value, "Got 407");
TEST_1(sip->sip_proxy_authorization);
TEST(e->data->e_status, 100);
TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
TEST(callstate(e->data->e_tags), nua_callstate_received); /* RECEIVED */
......@@ -2955,6 +2956,8 @@ int test_reject_401(struct context *ctx)
TEST_1(sip = sip_object(e->data->e_msg));
TEST_1(sip->sip_subject);
TEST_S(sip->sip_subject->g_value, "Got 401");
TEST_1(sip->sip_authorization);
TEST_1(sip->sip_proxy_authorization);
TEST(e->data->e_status, 100);
TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
TEST(callstate(e->data->e_tags), nua_callstate_received); /* RECEIVED */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment