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

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