Commit 14131c71 authored by Pekka Pessi's avatar Pekka Pessi

nta_msg_request_complete(): create To header from request-URI, if needed.

darcs-hash:20061006002318-65a35-16eb0540f65519dbc81c692ac4666a582ddc1a85.gz
parent b031bac7
......@@ -3090,10 +3090,21 @@ int nta_msg_request_complete(msg_t *msg,
nta_agent_newtag(home, "tag=%s", leg->leg_agent));
}
if (!sip->sip_to)
sip->sip_to = sip_to_dup(home, leg->leg_remote);
else if (leg->leg_remote && leg->leg_remote->a_tag)
if (sip->sip_to) {
if (leg->leg_remote && leg->leg_remote->a_tag)
sip_to_tag(home, sip->sip_to, leg->leg_remote->a_tag);
}
else if (leg->leg_remote) {
sip->sip_to = sip_to_dup(home, leg->leg_remote);
}
else {
sip_to_t *to = sip_to_create(home, request_uri);
if (to) sip_aor_strip(to->a_url);
sip->sip_to = to;
}
if (!sip->sip_from || !sip->sip_from || !sip->sip_to)
return -1;
method = sip->sip_request->rq_method;
method_name = sip->sip_request->rq_method_name;
......
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