Commit 9bf3ae68 authored by Pekka Pessi's avatar Pekka Pessi

Renamed NUTAG_USE_LEG() as NUTAG_USE_DIALOG() in nua.

darcs-hash:20051028123012-65a35-006fd7b14930daac222f9ccf1b6414037e68db35.gz
parent d7b72315
......@@ -1695,7 +1695,7 @@ msg_t *crequest_message(nua_t *nua, nua_handle_t *nh,
if (msg) {
ta_list ta;
int use_leg = 0, add_contact = 0;
int use_dialog = 0, add_contact = 0;
sip = sip_object(msg);
......@@ -1703,7 +1703,7 @@ msg_t *crequest_message(nua_t *nua, nua_handle_t *nh,
tl_gets(ta_args(ta),
NUTAG_URL_REF(url),
NUTAG_USE_LEG_REF(use_leg),
NUTAG_USE_DIALOG_REF(use_dialog),
/* NUTAG_COPY_REF(copy), */
NUTAG_ADD_CONTACT_REF(add_contact),
TAG_END());
......@@ -1746,7 +1746,7 @@ msg_t *crequest_message(nua_t *nua, nua_handle_t *nh,
sip_add_dup(msg, sip, (sip_header_t *)nua->nua_from) < 0))
msg_destroy(msg), msg = NULL;
if (use_leg && msg) {
if (use_dialog && msg) {
sip_route_t *route = sip->sip_route;
if (method == sip_method_invite ||
......@@ -3170,7 +3170,7 @@ ua_register(nua_t *nua, nua_handle_t *nh, nua_event_t e, tagi_t const *tags)
msg = crequest_message(nua, nh, cr, cr->cr_msg != NULL,
SIP_METHOD_REGISTER,
NUTAG_ADD_CONTACT(1),
TAG_IF(!registering, NUTAG_USE_LEG(1)),
TAG_IF(!registering, NUTAG_USE_DIALOG(1)),
TAG_NEXT(tags));
}
sip = sip_object(msg);
......@@ -3357,7 +3357,7 @@ refresh_register(nua_handle_t *nh, nua_dialog_usage_t *du, sip_time_t now)
msg = crequest_message(nua, nh, cr, 1,
SIP_METHOD_REGISTER,
NUTAG_USE_LEG(1),
NUTAG_USE_DIALOG(1),
TAG_END());
sip = sip_object(msg);
......@@ -3465,7 +3465,7 @@ ua_invite2(nua_t *nua, nua_handle_t *nh, nua_event_t e, int restarted,
msg = du ? crequest_message(nua, nh, cr, restarted,
SIP_METHOD_INVITE,
NUTAG_USE_LEG(1),
NUTAG_USE_DIALOG(1),
NUTAG_ADD_CONTACT(1),
TAG_NEXT(tags)) : NULL;
sip = sip_object(msg);
......@@ -4922,7 +4922,7 @@ ua_update(nua_t *nua, nua_handle_t *nh, nua_event_t e, tagi_t const *tags)
msg = crequest_message(nua, nh, cr, cr->cr_retry_count,
SIP_METHOD_UPDATE,
NUTAG_USE_LEG(1),
NUTAG_USE_DIALOG(1),
NUTAG_ADD_CONTACT(1),
TAG_NEXT(tags));
sip = sip_object(msg);
......@@ -5648,7 +5648,7 @@ ua_subscribe(nua_t *nua, nua_handle_t *nh, nua_event_t e, tagi_t const *tags)
msg = crequest_message(nua, nh, cr, cr->cr_retry_count,
SIP_METHOD_SUBSCRIBE,
NUTAG_USE_LEG(1),
NUTAG_USE_DIALOG(1),
/* Note: this is overriden by application */
/* SIPTAG_EVENT_STR("presence"), */
NUTAG_ADD_CONTACT(1),
......@@ -5825,7 +5825,7 @@ refresh_subscribe(nua_handle_t *nh, nua_dialog_usage_t *du, sip_time_t now)
msg = crequest_message(nua, nh, cr, 1,
SIP_METHOD_SUBSCRIBE,
NUTAG_USE_LEG(1),
NUTAG_USE_DIALOG(1),
NUTAG_ADD_CONTACT(1),
//SIPTAG_EVENT(du->du_event),
//SIPTAG_SUPPORTED(nh->nh_supported),
......@@ -6088,7 +6088,7 @@ ua_refer(nua_t *nua, nua_handle_t *nh, nua_event_t e, tagi_t const *tags)
/* Now we create a REFER request message */
msg = crequest_message(nua, nh, cr, cr->cr_retry_count,
SIP_METHOD_REFER,
NUTAG_USE_LEG(1),
NUTAG_USE_DIALOG(1),
SIPTAG_EVENT(SIP_NONE->sh_event), /* remove event */
SIPTAG_REFERRED_BY(by), /* Overriden by user tags */
NUTAG_ADD_CONTACT(1),
......
......@@ -99,8 +99,7 @@ tag_typedef_t nutag_certificate_phrase = STRTAG_TYPEDEF(certificate_phrase);
tag_typedef_t nutag_registrar = URLTAG_TYPEDEF(registrar);
tag_typedef_t nutag_sip_parser = PTRTAG_TYPEDEF(sip_parser);
tag_typedef_t nutag_use_leg = BOOLTAG_TYPEDEF(use_leg);
tag_typedef_t nutag_use_session = BOOLTAG_TYPEDEF(use_session);
tag_typedef_t nutag_use_dialog = BOOLTAG_TYPEDEF(use_dialog);
tag_typedef_t nutag_auth = STRTAG_TYPEDEF(auth);
tag_typedef_t nutag_authtime = INTTAG_TYPEDEF(authtime);
......
......@@ -154,32 +154,25 @@ extern tag_typedef_t nutag_uicc;
#define NUTAG_UICC_REF(x) nutag_uicc_ref, tag_str_vr(&(x))
extern tag_typedef_t nutag_uicc_ref;
/** Ask NUA to create leg for this handle
/** Ask NUA to create dialog for this handle
*
* @par Used with
* calls that send a SIP request
* @par Used with nua calls that send a SIP request
*
* @par Parameter type
* int
*
* @par Values
* @c 0 False \n
* @c !=0 True
* @c False (zero) \n
* @c True (nonzero)
*
* Corresponding tag taking reference parameter is NUTAG_USE_LEG_REF()
* Corresponding tag taking reference parameter is NUTAG_USE_DIALOG_REF()
*/
#define NUTAG_USE_LEG(x) nutag_use_leg, tag_bool_v(x)
extern tag_typedef_t nutag_use_leg;
#define NUTAG_USE_DIALOG(x) nutag_use_dialog, tag_bool_v(x)
extern tag_typedef_t nutag_use_dialog;
#define NUTAG_USE_LEG_REF(x) nutag_use_leg_ref, tag_bool_vr(&(x))
extern tag_typedef_t nutag_use_leg_ref;
#define NUTAG_USE_DIALOG_REF(x) nutag_use_dialog_ref, tag_bool_vr(&(x))
extern tag_typedef_t nutag_use_dialog_ref;
/** Create a session for this handle */
#define NUTAG_USE_SESSION(x) nutag_use_session, tag_bool_v(x)
extern tag_typedef_t nutag_use_session;
#define NUTAG_USE_SESSION_REF(x) nutag_use_session_ref, tag_bool_vr(&(x))
extern tag_typedef_t nutag_use_session_ref;
/* Protocol engine parameters,
* set by nua_set_params(), get by nua_get_params() */
......@@ -1254,6 +1247,9 @@ su_inline tag_value_t nutag_handle_vr(nua_handle_t **vp) {return(tag_value_t)vp;
/* Tags for compatibility */
#define NUTAG_USE_LEG(x) NUTAG_USE_DIALOG(x)
#define NUTAG_USE_LEG_REF(x) NUTAG_USE_DIALOG_REF(x)
#define NUTAG_AF(x) SOATAG_AF((x))
#define NUTAG_AF_REF(x) SOATAG_AF_REF((x))
......
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