Commit 7cbb6a4b authored by Pekka Pessi's avatar Pekka Pessi

nua_register.c, outbound.c: do not modify aor or outbound contacts unnecessarily

The outbound used to add an extra contact to the unregistration request.

darcs-hash:20070403082632-65a35-8dbc19cbe0d3932dbb22e34a64ce062366d4c4b7.gz
parent 1be0bdea
......@@ -622,18 +622,20 @@ static int nua_register_client_init(nua_client_request_t *cr,
return -1;
nr = nua_dialog_usage_private(du);
nua_registration_add(&nh->nh_nua->nua_registrations, nr);
if (nua_client_bind(cr, du) < 0)
return -1;
if (aor == NULL)
aor = sip->sip_from;
if (aor == NULL)
aor = nh->nh_nua->nua_from;
if (!nr->nr_list) {
nua_registration_add(&nh->nh_nua->nua_registrations, nr);
if (nua_registration_set_aor(nh->nh_home, nr, aor) < 0)
return -1;
if (aor == NULL)
aor = sip->sip_from;
if (aor == NULL)
aor = nh->nh_nua->nua_from;
if (nua_registration_set_aor(nh->nh_home, nr, aor) < 0)
return -1;
}
if (nua_registration_set_contact(nh, nr, sip->sip_contact, unreg) < 0)
return -1;
......
......@@ -1091,6 +1091,9 @@ int outbound_set_contact(outbound_t *ob,
m3 = ob->ob_previous;
if (terminating) {
if (ob->ob_by_stack && application_contact == NULL)
return 0;
if (ob->ob_contacts)
previous = ob->ob_rcontact;
}
......@@ -1101,6 +1104,9 @@ int outbound_set_contact(outbound_t *ob,
previous = ob->ob_contacts ? ob->ob_rcontact : NULL;
}
}
else if (ob->ob_by_stack) {
return 0; /* Xyzzy - nothing happens */
}
else if (v) {
char const *tport = !v->v_next ? v->v_protocol : NULL;
char reg_id_param[20];
......
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