Commit 0d45850d authored by Pekka Pessi's avatar Pekka Pessi

outbound.c, outbound.h, nua_register.h: removed omgwtf parameter historically used with gruu

Updated gruu parameter (now pub-gruu). Should figure out when to use
temp-gruu.

darcs-hash:20070917115427-65a35-fdbf3f27f2fbe1660f60229725600129a9a3cf19.gz
parent 0b1c8cbf
......@@ -245,7 +245,6 @@ static void nua_register_connection_closed(tp_stack_t *sip_stack,
sip_contact_t *nua_handle_contact_by_via(nua_handle_t *nh,
su_home_t *home,
int in_dialog,
char const *extra_username,
sip_via_t const *v,
char const *transport,
char const *m_param,
......@@ -268,12 +267,12 @@ static int nua_stack_outbound_credentials(nua_handle_t *, auth_client_t **auc);
outbound_owner_vtable nua_stack_outbound_callbacks = {
sizeof nua_stack_outbound_callbacks,
nua_handle_contact_by_via,
nua_stack_outbound_refresh,
nua_stack_outbound_status,
nua_stack_outbound_failed,
nua_stack_outbound_failed,
nua_stack_outbound_credentials
/* oo_contact */ nua_handle_contact_by_via,
/* oo_refresh */ nua_stack_outbound_refresh,
/* oo_status */ nua_stack_outbound_status,
/* oo_probe_error */ nua_stack_outbound_failed,
/* oo_keepalive_error */ nua_stack_outbound_failed,
/* oo_credentials */ nua_stack_outbound_credentials
};
/**@fn void nua_register(nua_handle_t *nh, tag_type_t tag, tag_value_t value, ...);
......@@ -1364,7 +1363,7 @@ int nua_registration_from_via(nua_registration_t **list,
v2[1].v_next = NULL;
contact = nua_handle_contact_by_via(nh, home, 0, NULL, v2, protocol, NULL);
contact = nua_handle_contact_by_via(nh, home, 0, v2, protocol, NULL);
v = sip_via_dup(home, v2);
......@@ -1780,7 +1779,7 @@ int nua_registration_set_contact(nua_handle_t *nh,
if (nr0 && nr0->nr_via) {
char const *tport = nr0->nr_via->v_next ? NULL : nr0->nr_via->v_protocol;
m = nua_handle_contact_by_via(nh, nh->nh_home, 0,
NULL, nr0->nr_via, tport, NULL);
nr0->nr_via, tport, NULL);
}
}
......@@ -1918,7 +1917,6 @@ static int nua_stack_outbound_credentials(nua_handle_t *nh,
sip_contact_t *nua_handle_contact_by_via(nua_handle_t *nh,
su_home_t *home,
int in_dialog,
char const *extra_username,
sip_via_t const *v,
char const *transport,
char const *m_param,
......@@ -1978,7 +1976,6 @@ sip_contact_t *nua_handle_contact_by_via(nua_handle_t *nh,
s = NH_PGET(nh, m_username);
if (s)
url.url_user = s;
/* OMGWTF? if (extra_username) su_strlst_append(l, s); */
url.url_host = host;
url.url_port = port;
url.url_params = su_strdup(home, NH_PGET(nh, m_params));
......@@ -1992,7 +1989,7 @@ sip_contact_t *nua_handle_contact_by_via(nua_handle_t *nh,
}
if (comp) {
url.url_params = url_strip_param_string((char*)url.url_params, "comp");
url_param_add(home, &url, su_sprintf(home, "comp=%s", maddr));
url_param_add(home, &url, su_sprintf(home, "comp=%s", comp));
}
l = su_strlst_create(NULL);
......
......@@ -581,7 +581,10 @@ int outbound_gruuize(outbound_t *ob, sip_t const *sip)
return 0;
}
gruu = (char *)msg_header_find_param(m->m_common, "gruu=");
gruu = (char *)msg_header_find_param(m->m_common, "pub-gruu=");
if (gruu == NULL || gruu[0] == '\0')
gruu = (char *)msg_header_find_param(m->m_common, "gruu=");
if (gruu == NULL || gruu[0] == '\0')
return 0;
......@@ -1004,14 +1007,14 @@ int outbound_contacts_from_via(outbound_t *ob, sip_via_t const *via)
v = v0; *v0 = *via; v0->v_next = NULL;
dcontact = ob->ob_oo->oo_contact(ob->ob_owner, home, 1,
NULL, v, v->v_protocol, NULL);
dcontact = ob->ob_oo->oo_contact(ob->ob_owner, home, 1,
v, v->v_protocol, NULL);
if (ob->ob_instance && ob->ob_reg_id != 0)
snprintf(reg_id_param, sizeof reg_id_param, ";reg-id=%u", ob->ob_reg_id);
rcontact = ob->ob_oo->oo_contact(ob->ob_owner, home, 0,
NULL, v, v->v_protocol,
v, v->v_protocol,
ob->ob_instance, reg_id_param, NULL);
v = sip_via_dup(home, v);
......@@ -1112,7 +1115,7 @@ int outbound_set_contact(outbound_t *ob,
char reg_id_param[20];
dcontact = ob->ob_oo->oo_contact(ob->ob_owner, home, 1,
NULL, v, tport, NULL);
v, tport, NULL);
if (!dcontact)
return -1;
......@@ -1120,7 +1123,7 @@ int outbound_set_contact(outbound_t *ob,
snprintf(reg_id_param, sizeof reg_id_param, ";reg-id=%u", ob->ob_reg_id);
rcontact = ob->ob_oo->oo_contact(ob->ob_owner, home, 0,
NULL, v, v->v_protocol,
v, v->v_protocol,
ob->ob_instance, reg_id_param, NULL);
if (!rcontact)
return -1;
......
......@@ -119,7 +119,6 @@ struct outbound_owner_vtable
sip_contact_t *(*oo_contact)(outbound_owner_t *,
su_home_t *home,
int used_in_dialog,
char const *extra_username,
sip_via_t const *v,
char const *transport,
char const *m_param,
......
......@@ -1461,7 +1461,7 @@ SOFIAPUBVAR tag_typedef_t nutag_m_username_ref;
/**URL parameters for @Contact.
*
* Specify URL parameters for the Contact header URI generated for
* Specify URL parameters for the @Contact header URI generated for
* registration request and dialog-creating requests/responses.
*
* Please note that some proxies may remove even the non-transport
......
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