Commit c67dd827 authored by Pekka Pessi's avatar Pekka Pessi

nua: added nua_stack_tevent(), updated nua_stack_event() prototype.

darcs-hash:20070108152949-65a35-a69206713a73098f644e078eb9706dde2275df1a.gz
parent 5aa3efa1
......@@ -118,13 +118,13 @@ nua_stack_notifier(nua_t *nua, nua_handle_t *nh, nua_event_t e, tagi_t const *ta
status = 900, phrase = "Error when notifying watchers";
else
nua_stack_event(nua, nh, NULL, e, status = SIP_200_OK,
SIPTAG_EVENT(event),
SIPTAG_CONTENT_TYPE(ct),
TAG_END());
nua_stack_tevent(nua, nh, NULL, e, status = SIP_200_OK,
SIPTAG_EVENT(event),
SIPTAG_CONTENT_TYPE(ct),
TAG_END());
if (status != 200)
nua_stack_event(nua, nh, NULL, e, status, phrase, TAG_END());
nua_stack_event(nua, nh, NULL, e, status, phrase, NULL);
su_home_deinit(home);
}
......@@ -235,10 +235,10 @@ void authorize_watcher(nea_server_t *nes,
nh, "watcher is removed"));
}
nua_stack_event(nua, nh, msg, nua_i_subscription, status, phrase,
NUTAG_SUBSTATE(substate),
NEATAG_SUB(sn->sn_subscriber),
TAG_END());
nua_stack_tevent(nua, nh, msg, nua_i_subscription, status, phrase,
NUTAG_SUBSTATE(substate),
NEATAG_SUB(sn->sn_subscriber),
TAG_END());
}
/* ---------------------------------------------------------------------- */
......@@ -259,12 +259,11 @@ void nua_stack_authorize(nua_t *nua,
if (sub && state > 0) {
nea_sub_auth(sub, state, TAG_NEXT(tags));
nua_stack_event(nua, nh, NULL, e, SIP_200_OK, TAG_END());
nua_stack_event(nua, nh, NULL, e, SIP_200_OK, NULL);
}
else {
nua_stack_event(nua, nh, NULL, e, NUA_INTERNAL_ERROR, TAG_END());
nua_stack_event(nua, nh, NULL, e, NUA_INTERNAL_ERROR, NULL);
}
return;
}
/** @internal Shutdown notifier object */
......@@ -344,5 +343,5 @@ void nua_stack_terminate(nua_t *nua,
NEATAG_REASON("noresource"),
TAG_NEXT(tags));
nua_stack_event(nua, nh, NULL, e, SIP_200_OK, TAG_END());
nua_stack_event(nua, nh, NULL, e, SIP_200_OK, NULL);
}
......@@ -162,7 +162,7 @@ int respond_to_method(nua_server_request_t *sr, tagi_t const *tags)
if (status != sr->sr_status)
nua_stack_event(nua, nh, NULL,
nua_i_error, 900, "Response to Extension Method Fails",
TAG_END());
NULL);
return final;
}
......@@ -556,9 +556,9 @@ static void nua_notify_usage_refresh(nua_handle_t *nh,
return;
}
nua_stack_event(nh->nh_nua, nh, NULL, e, NUA_INTERNAL_ERROR,
NUTAG_SUBSTATE(nua_substate_terminated),
TAG_END());
nua_stack_tevent(nh->nh_nua, nh, NULL, e, NUA_INTERNAL_ERROR,
NUTAG_SUBSTATE(nua_substate_terminated),
TAG_END());
nua_dialog_usage_remove(nh, ds, du);
}
......
......@@ -1603,7 +1603,7 @@ int nua_stack_get_params(nua_t *nua, nua_handle_t *nh, nua_event_t e,
TAG_NEXT(media_params));
nua_stack_event(nua, nh, NULL, nua_r_get_params, SIP_200_OK, TAG_NEXT(lst));
nua_stack_event(nua, nh, NULL, nua_r_get_params, SIP_200_OK, lst);
su_home_deinit(tmphome);
......
......@@ -405,7 +405,7 @@ static void nua_publish_usage_refresh(nua_handle_t *nh,
nua_stack_event(nh->nh_nua, nh, NULL,
nua_r_publish, NUA_INTERNAL_ERROR,
TAG_END());
NULL);
nua_dialog_usage_remove(nh, ds, du);
}
......
......@@ -922,6 +922,7 @@ static void nua_register_usage_refresh(nua_handle_t *nh,
nua_dialog_usage_t *du,
sip_time_t now)
{
nua_t *nua = nh->nh_nua;
nua_client_request_t *cr = du->du_cr;
if (cr) {
......@@ -931,8 +932,7 @@ static void nua_register_usage_refresh(nua_handle_t *nh,
}
/* Report that we have de-registered */
nua_stack_event(nh->nh_nua, nh, NULL, nua_r_register, NUA_INTERNAL_ERROR,
TAG_END());
nua_stack_event(nua, nh, NULL, nua_r_register, NUA_INTERNAL_ERROR, NULL);
nua_dialog_usage_remove(nh, ds, du);
}
......@@ -1065,9 +1065,7 @@ void nua_network_changed_cb(nua_t *nua, su_root_t *root)
switch (nw_updates) {
case NUA_NW_DETECT_ONLY_INFO:
nua_stack_event(nua, NULL, NULL, nua_i_network_changed,
SIP_200_OK, TAG_END());
nua_stack_event(nua, NULL, NULL, nua_i_network_changed, SIP_200_OK, NULL);
break;
case NUA_NW_DETECT_TRY_FULL:
......@@ -1079,10 +1077,10 @@ void nua_network_changed_cb(nua_t *nua, su_root_t *root)
if (nua_stack_init_transport(nua, nua->nua_args) < 0)
/* We are hosed */
nua_stack_event(nua, NULL, NULL, nua_i_network_changed,
900, "Internal Error", TAG_END());
900, "Internal Error", NULL);
else
nua_stack_event(nua, NULL, NULL, nua_i_network_changed,
SIP_200_OK, TAG_END());
SIP_200_OK, NULL);
break;
......@@ -1702,7 +1700,7 @@ static int nua_stack_outbound_status(nua_handle_t *nh, outbound_t *ob,
nua_stack_event(nh->nh_nua, nh, NULL,
nua_i_outbound, status, phrase,
ta_tags(ta));
ta_args(ta));
ta_end(ta);
......@@ -1719,7 +1717,7 @@ static int nua_stack_outbound_failed(nua_handle_t *nh, outbound_t *ob,
nua_stack_event(nh->nh_nua, nh, NULL,
nua_i_outbound, status, phrase,
ta_tags(ta));
ta_args(ta));
ta_end(ta);
......
......@@ -801,7 +801,7 @@ static int nua_invite_client_report(nua_client_request_t *cr,
nta_outgoing_getresponse(orq),
cr->cr_event,
status, phrase,
TAG_NEXT(tags));
tags);
if (orq != cr->cr_orq && status != 100)
return 1;
......@@ -1410,7 +1410,7 @@ static int nua_prack_client_request(nua_client_request_t *cr,
nh, status, phrase));
nua_stack_event(nh->nh_nua, nh, NULL,
nua_i_media_error, status, phrase,
TAG_END());
NULL);
return nua_client_return(cr, status, phrase, msg);
}
else {
......@@ -1425,7 +1425,7 @@ static int nua_prack_client_request(nua_client_request_t *cr,
status = soa_error_as_sip_response(nh->nh_soa, &phrase);
SU_DEBUG_3(("nua(%p): PRACK offer: %d %s\n", nh, status, phrase));
nua_stack_event(nh->nh_nua, nh, NULL,
nua_i_media_error, status, phrase, TAG_END());
nua_i_media_error, status, phrase, NULL);
return nua_client_return(cr, status, phrase, msg);
}
else {
......@@ -1475,7 +1475,7 @@ static int nua_prack_client_report(nua_client_request_t *cr,
nta_outgoing_getresponse(orq),
cr->cr_event,
status, phrase,
TAG_NEXT(tags));
tags);
if (!ss || orq != cr->cr_orq || cr->cr_terminated || cr->cr_graceful)
return 1;
......@@ -1856,11 +1856,11 @@ int process_invite(nua_t *nua,
SIPTAG_USER_AGENT_STR(NUA_PGET(nua, nh, user_agent)),
TAG_END());
nua_stack_event(nh->nh_nua, nh,
msg_ref_create(sr->sr_request),
nua_i_invite, SIP_100_TRYING,
NH_ACTIVE_MEDIA_TAGS(1, nh->nh_soa),
TAG_END());
nua_stack_tevent(nh->nh_nua, nh,
msg_ref_create(sr->sr_request),
nua_i_invite, SIP_100_TRYING,
NH_ACTIVE_MEDIA_TAGS(1, nh->nh_soa),
TAG_END());
signal_call_state_change(nh, ss, SIP_100_TRYING, nua_callstate_received);
......@@ -2045,13 +2045,13 @@ int respond_to_invite(nua_server_request_t *sr, tagi_t const *tags)
if (initial) {
sr->sr_event = 1;
nua_stack_event(nh->nh_nua, nh, msg_ref_create(sr->sr_request),
nua_i_invite, status, phrase,
NH_ACTIVE_MEDIA_TAGS(1, nh->nh_soa),
TAG_END());
nua_stack_tevent(nh->nh_nua, nh, msg_ref_create(sr->sr_request),
nua_i_invite, status, phrase,
NH_ACTIVE_MEDIA_TAGS(1, nh->nh_soa),
TAG_END());
}
else if (status != sr->sr_status)
nua_stack_event(nua, nh, NULL, nua_i_error, status, phrase, TAG_END());
nua_stack_event(nua, nh, NULL, nua_i_error, status, phrase, NULL);
sr->sr_status = status, sr->sr_phrase = phrase;
......@@ -2169,9 +2169,7 @@ int process_prack(nua_handle_t *nh,
else if (sip == NULL) {
SET_STATUS(504, "Reliable Response Timeout");
nua_stack_event(nh->nh_nua, nh, NULL,
nua_i_error, status, phrase,
TAG_END());
nua_stack_event(nh->nh_nua, nh, NULL, nua_i_error, status, phrase, NULL);
nua_server_respond(sri, status, phrase, TAG_END());
......@@ -2232,7 +2230,7 @@ int process_prack(nua_handle_t *nh,
}
nua_stack_event(nh->nh_nua, nh, nta_incoming_getrequest(irq),
nua_i_prack, status, phrase, TAG_END());
nua_i_prack, status, phrase, NULL);
if (status >= 300)
return status;
......@@ -2297,9 +2295,9 @@ int process_ack(nua_server_request_t *sr,
reason = soa_error_as_sip_reason(nh->nh_soa);
nua_stack_event(nh->nh_nua, nh, msg,
nua_i_ack, status, phrase, TAG_END());
nua_i_ack, status, phrase, NULL);
nua_stack_event(nh->nh_nua, nh, NULL,
nua_i_media_error, status, phrase, TAG_END());
nua_i_media_error, status, phrase, NULL);
assert(ss->ss_oa_recv == NULL);
......@@ -2317,7 +2315,7 @@ int process_ack(nua_server_request_t *sr,
}
soa_clear_remote_sdp(nh->nh_soa);
nua_stack_event(nh->nh_nua, nh, msg, nua_i_ack, SIP_200_OK, TAG_END());
nua_stack_event(nh->nh_nua, nh, msg, nua_i_ack, SIP_200_OK, NULL);
signal_call_state_change(nh, ss, 200, "OK", nua_callstate_ready);
set_session_timer(ss);
......@@ -2355,7 +2353,7 @@ int process_cancel(nua_server_request_t *sr,
assert(nta_incoming_status(irq) < 200); assert(sr->sr_respond);
assert(ss); assert(ss == nua_session_usage_get(nh->nh_ds)); (void)ss;
nua_stack_event(nh->nh_nua, nh, cancel, nua_i_cancel, SIP_200_OK, TAG_END());
nua_stack_event(nh->nh_nua, nh, cancel, nua_i_cancel, SIP_200_OK, NULL);
nua_server_respond(sr, SIP_487_REQUEST_TERMINATED, TAG_END());
......@@ -2374,7 +2372,7 @@ int process_timeout(nua_server_request_t *sr,
nua_stack_event(nh->nh_nua, nh, 0, nua_i_error,
408, "Response timeout",
TAG_END());
NULL);
if (sr->sr_respond) {
/* PRACK timeout */
......@@ -3005,7 +3003,7 @@ static int nua_update_client_report(nua_client_request_t *cr,
nta_outgoing_getresponse(orq),
cr->cr_event,
status, phrase,
TAG_NEXT(tags));
tags);
if (!ss || orq != cr->cr_orq ||
cr->cr_terminated || cr->cr_graceful || !cr->cr_offer_sent)
......@@ -3142,7 +3140,7 @@ int nua_stack_process_update(nua_t *nua,
}
if (status != original_status) {
nua_stack_event(nua, nh, NULL, nua_i_error, status, phrase, TAG_END());
nua_stack_event(nua, nh, NULL, nua_i_error, status, phrase, NULL);
nta_incoming_treply(irq, status, phrase, TAG_END());
msg_destroy(rmsg), rmsg = NULL;
}
......@@ -3163,7 +3161,7 @@ int nua_stack_process_update(nua_t *nua,
* @END_NUA_EVENT
*/
nua_stack_event(nh->nh_nua, nh, msg, nua_i_update, status, phrase, TAG_END());
nua_stack_event(nh->nh_nua, nh, msg, nua_i_update, status, phrase, NULL);
if (offer_recv || answer_sent) {
assert(!offer_recv || !ss->ss_oa_recv);
......@@ -3337,7 +3335,7 @@ static int nua_bye_client_report(nua_client_request_t *cr,
nta_outgoing_getresponse(orq),
cr->cr_event,
status, phrase,
TAG_NEXT(tags));
tags);
if (du == NULL) {
/* No more session */
......@@ -3391,7 +3389,7 @@ int nua_stack_process_bye(nua_t *nua,
assert(nh && ss);
nua_stack_event(nh->nh_nua, nh, nta_incoming_getrequest(irq),
nua_i_bye, SIP_200_OK, TAG_END());
nua_i_bye, SIP_200_OK, NULL);
nta_incoming_treply(irq, SIP_200_OK, TAG_END());
nta_incoming_destroy(irq), irq = NULL;
......@@ -3562,20 +3560,20 @@ static void signal_call_state_change(nua_handle_t *nh,
* @END_NUA_EVENT
*/
nua_stack_event(nh->nh_nua, nh, NULL, nua_i_state,
status, phrase,
NUTAG_CALLSTATE(next_state),
NH_ACTIVE_MEDIA_TAGS(1, nh->nh_soa),
/* NUTAG_SOA_SESSION(nh->nh_soa), */
TAG_IF(offer_recv, NUTAG_OFFER_RECV(offer_recv)),
TAG_IF(answer_recv, NUTAG_ANSWER_RECV(answer_recv)),
TAG_IF(offer_sent, NUTAG_OFFER_SENT(offer_sent)),
TAG_IF(answer_sent, NUTAG_ANSWER_SENT(answer_sent)),
TAG_IF(oa_recv, SOATAG_REMOTE_SDP(remote_sdp)),
TAG_IF(oa_recv, SOATAG_REMOTE_SDP_STR(remote_sdp_str)),
TAG_IF(oa_sent, SOATAG_LOCAL_SDP(local_sdp)),
TAG_IF(oa_sent, SOATAG_LOCAL_SDP_STR(local_sdp_str)),
TAG_END());
nua_stack_tevent(nh->nh_nua, nh, NULL, nua_i_state,
status, phrase,
NUTAG_CALLSTATE(next_state),
NH_ACTIVE_MEDIA_TAGS(1, nh->nh_soa),
/* NUTAG_SOA_SESSION(nh->nh_soa), */
TAG_IF(offer_recv, NUTAG_OFFER_RECV(offer_recv)),
TAG_IF(answer_recv, NUTAG_ANSWER_RECV(answer_recv)),
TAG_IF(offer_sent, NUTAG_OFFER_SENT(offer_sent)),
TAG_IF(answer_sent, NUTAG_ANSWER_SENT(answer_sent)),
TAG_IF(oa_recv, SOATAG_REMOTE_SDP(remote_sdp)),
TAG_IF(oa_recv, SOATAG_REMOTE_SDP_STR(remote_sdp_str)),
TAG_IF(oa_sent, SOATAG_LOCAL_SDP(local_sdp)),
TAG_IF(oa_sent, SOATAG_LOCAL_SDP_STR(local_sdp_str)),
TAG_END());
/** @NUA_EVENT nua_i_active
*
......@@ -3599,10 +3597,10 @@ static void signal_call_state_change(nua_handle_t *nh,
*/
if (next_state == nua_callstate_ready && ss_state <= nua_callstate_ready) {
nua_stack_event(nh->nh_nua, nh, NULL, nua_i_active, status, "Call active",
NH_ACTIVE_MEDIA_TAGS(1, nh->nh_soa),
/* NUTAG_SOA_SESSION(nh->nh_soa), */
TAG_END());
nua_stack_tevent(nh->nh_nua, nh, NULL, nua_i_active, status, "Call active",
NH_ACTIVE_MEDIA_TAGS(1, nh->nh_soa),
/* NUTAG_SOA_SESSION(nh->nh_soa), */
TAG_END());
}
/** @NUA_EVENT nua_i_terminated
......@@ -3630,8 +3628,9 @@ static void signal_call_state_change(nua_handle_t *nh,
*/
else if (next_state == nua_callstate_terminated) {
nua_stack_event(nh->nh_nua, nh, NULL, nua_i_terminated, status, phrase,
TAG_END());
nua_stack_event(nh->nh_nua, nh, NULL,
nua_i_terminated, status, phrase,
NULL);
}
}
......
......@@ -228,14 +228,24 @@ void
int nh_notifier_shutdown(nua_handle_t *nh, nea_event_t *ev,
tag_type_t t, tag_value_t v, ...);
int nua_stack_tevent(nua_t *nua, nua_handle_t *nh, msg_t *msg,
nua_event_t event, int status, char const *phrase,
tag_type_t tag, tag_value_t value, ...)
{
ta_list ta;
int retval;
ta_start(ta, tag, value);
retval = nua_stack_event(nua, nh, msg, event, status, phrase, ta_args(ta));
ta_end(ta);
return retval;
}
/** @internal Send an event to the application. */
int nua_stack_event(nua_t *nua, nua_handle_t *nh, msg_t *msg,
nua_event_t event, int status, char const *phrase,
tag_type_t tag, tag_value_t value, ...)
tagi_t const *tags)
{
su_msg_r sumsg = SU_MSG_R_INIT;
ta_list ta;
size_t e_len, len, xtra, p_len;
if (event == nua_r_ack || event == nua_i_none)
......@@ -269,27 +279,35 @@ int nua_stack_event(nua_t *nua, nua_handle_t *nh, msg_t *msg,
return event;
}
ta_start(ta, tag, value);
e_len = offsetof(event_t, e_tags);
len = tl_len(ta_args(ta));
xtra = tl_xtra(ta_args(ta), len);
if (tags) {
e_len = offsetof(event_t, e_tags);
len = tl_len(tags);
xtra = tl_xtra(tags, len);
}
else {
e_len = sizeof(event_t), len = 0, xtra = 0;
}
p_len = phrase ? strlen(phrase) + 1 : 1;
if (su_msg_create(sumsg, nua->nua_client, su_task_null,
nua_event, e_len + len + xtra + p_len) == 0) {
event_t *e = su_msg_data(sumsg);
void *p;
tagi_t *t = e->e_tags, *t_end = (tagi_t *)((char *)t + len);
void *b = t_end, *end = (char *)b + xtra;
if (tags) {
tagi_t *t = e->e_tags, *t_end = (tagi_t *)((char *)t + len);
void *b = t_end, *end = (char *)b + xtra;
t = tl_dup(t, ta_args(ta), &b);
assert(t == t_end); assert(b == end);
t = tl_dup(t, tags, &b); p = b;
assert(t == t_end); assert(b == end);
}
else
p = e + 1;
e->e_event = event;
e->e_nh = nh ? nua_handle_ref(nh) : nua->nua_dhandle;
e->e_status = status;
e->e_phrase = strcpy(end, phrase ? phrase : "");
e->e_phrase = strcpy(p, phrase ? phrase : "");
if (msg)
e->e_msg = msg, su_home_threadsafe(msg_home(msg));
......@@ -297,8 +315,6 @@ int nua_stack_event(nua_t *nua, nua_handle_t *nh, msg_t *msg,
nua_handle_unref(nh);
}
ta_end(ta);
return event;
}
......@@ -359,7 +375,7 @@ void nua_stack_signal(nua_t *nua, su_msg_r msg, nua_event_data_t *e)
/* Shutting down */
nua_stack_event(nua, nh, NULL, event,
901, "Stack is going down",
TAG_END());
NULL);
}
else switch (event) {
......@@ -440,11 +456,7 @@ void nua_stack_signal(nua_t *nua, su_msg_r msg, nua_event_data_t *e)
}
if (error < 0) {
nua_stack_event(nh->nh_nua, nh,
NULL,
event,
NUA_INTERNAL_ERROR,
TAG_END());
nua_stack_event(nh->nh_nua, nh, NULL, event, NUA_INTERNAL_ERROR, NULL);
}
if (su_msg_is_non_null(nua->nua_signal))
......@@ -642,7 +654,7 @@ void nua_stack_shutdown(nua_t *nua)
nta_agent_destroy(nua->nua_nta), nua->nua_nta = NULL;
}
nua_stack_event(nua, NULL, NULL, nua_r_shutdown, status, phrase, TAG_END());
nua_stack_event(nua, NULL, NULL, nua_r_shutdown, status, phrase, NULL);
}
/* ---------------------------------------------------------------------- */
......@@ -1121,14 +1133,14 @@ nua_stack_authenticate(nua_t *nua, nua_handle_t *nh, nua_event_t e,
else {
nua_stack_event(nua, nh, NULL, e,
202, "No operation to restart",
TAG_END());
NULL);
}
}
else if (status < 0) {
nua_stack_event(nua, nh, NULL, e, 900, "Cannot add credentials", TAG_END());
nua_stack_event(nua, nh, NULL, e, 900, "Cannot add credentials", NULL);
}
else {
nua_stack_event(nua, nh, NULL, e, 904, "No matching challenge", TAG_END());
nua_stack_event(nua, nh, NULL, e, 904, "No matching challenge", NULL);
}
}
......@@ -1407,7 +1419,7 @@ int nua_stack_server_event(nua_t *nua,
assert(sr->sr_owner);
nua_stack_event(nua, sr->sr_owner, msg_ref_create(sr->sr_request), event,
sr->sr_status, sr->sr_phrase,
ta_tags(ta));
ta_args(ta));
ta_end(ta);
if (final)
......@@ -1594,12 +1606,12 @@ nua_stack_respond(nua_t *nua, nua_handle_t *nh,
}
else if (sr) {
nua_stack_event(nua, nh, NULL, nua_i_error,
500, "Already Sent Final Response", TAG_END());
500, "Already Sent Final Response", NULL);
return;
}
nua_stack_event(nua, nh, NULL, nua_i_error,
500, "Responding to a Non-Existing Request", TAG_END());
500, "Responding to a Non-Existing Request", NULL);
}
/* ---------------------------------------------------------------------- */
......@@ -1688,7 +1700,7 @@ int nua_client_create(nua_handle_t *nh,
NULL,
event,
NUA_INTERNAL_ERROR,
TAG_END());
NULL);
}
cr->cr_owner = nh;
......@@ -2604,7 +2616,7 @@ int nua_client_report(nua_client_request_t *cr,
nta_outgoing_getresponse(orq),
cr->cr_event,
status, phrase,
TAG_NEXT(tags));
tags);
return 1;
}
......
......@@ -305,20 +305,23 @@ nua_stack_signal_handler
nua_stack_method;
#define UA_EVENT1(e, statusphrase) \
nua_stack_event(nua, nh, NULL, e, statusphrase, TAG_END())
nua_stack_event(nua, nh, NULL, e, statusphrase, NULL)
#define UA_EVENT2(e, status, phrase) \
nua_stack_event(nua, nh, NULL, e, status, phrase, TAG_END())
nua_stack_event(nua, nh, NULL, e, status, phrase, NULL)
#define UA_EVENT3(e, status, phrase, tag) \
nua_stack_event(nua, nh, NULL, e, status, phrase, tag, TAG_END())
nua_stack_event(nua, nh, NULL, e, status, phrase, tag, NULL)
int nua_stack_tevent(nua_t *nua, nua_handle_t *nh, msg_t *msg,
nua_event_t event, int status, char const *phrase,
tag_type_t tag, tag_value_t value, ...);
int nua_stack_event(nua_t *nua, nua_handle_t *nh, msg_t *msg,
nua_event_t event, int status, char const *phrase,
tag_type_t tag, tag_value_t value, ...);
tagi_t const *tags);
nua_handle_t *nh_create_handle(nua_t *nua, nua_hmagic_t *hmagic,
tagi_t *tags);
nua_handle_t *nh_create_handle(nua_t *nua, nua_hmagic_t *hmagic, tagi_t *tags);
nua_handle_t *nua_stack_incoming_handle(nua_t *nua,
nta_incoming_t *irq,
......
......@@ -422,11 +422,11 @@ static void nua_subscribe_usage_refresh(nua_handle_t *nh,
nh, o ? o->o_type : "(empty)",
id ? "; id=" : "", id ? id : ""));
nua_stack_event(nh->nh_nua, nh, NULL,
nua_i_notify, 408, "Fetch Timeouts without NOTIFY",
NUTAG_SUBSTATE(nua_substate_terminated),
SIPTAG_EVENT(du->du_event),
TAG_END());
nua_stack_tevent(nh->nh_nua, nh, NULL,
nua_i_notify, 408, "Fetch Timeouts without NOTIFY",
NUTAG_SUBSTATE(nua_substate_terminated),
SIPTAG_EVENT(du->du_event),
TAG_END());
nua_dialog_usage_remove(nh, ds, du);
return;
......@@ -444,11 +444,11 @@ static void nua_subscribe_usage_refresh(nua_handle_t *nh,
*/
}
nua_stack_event(nh->nh_nua, nh, NULL,
nua_i_notify, NUA_INTERNAL_ERROR,
NUTAG_SUBSTATE(nua_substate_terminated),
SIPTAG_EVENT(du->du_event),
TAG_END());
nua_stack_tevent(nh->nh_nua, nh, NULL,
nua_i_notify, NUA_INTERNAL_ERROR,
NUTAG_SUBSTATE(nua_substate_terminated),
SIPTAG_EVENT(du->du_event),
TAG_END());
nua_dialog_usage_remove(nh, ds, du);
}
......@@ -623,10 +623,10 @@ int nua_stack_process_notify(nua_t *nua,
if (eu->eu_substate == nua_substate_terminated && retry > 0)
eu->eu_substate = nua_substate_embryonic;
nua_stack_event(nh->nh_nua, nh, nta_incoming_getrequest(irq),
nua_i_notify, SIP_200_OK,
NUTAG_SUBSTATE(eu->eu_substate),
TAG_END());
nua_stack_tevent(nh->nh_nua, nh, nta_incoming_getrequest(irq),
nua_i_notify, SIP_200_OK,
NUTAG_SUBSTATE(eu->eu_substate),
TAG_END());
nta_incoming_destroy(irq), irq = NULL;
......@@ -820,10 +820,10 @@ static int nua_refer_client_request(nua_client_request_t *cr,
if (!error) {
/* Give application an Event header for matching NOTIFYs with REFER */
nua_stack_event(nh->nh_nua, nh, NULL,
cr->cr_event, SIP_100_TRYING,
NUTAG_REFER_EVENT(event),
TAG_END());
nua_stack_tevent(nh->nh_nua, nh, NULL,
cr->cr_event, SIP_100_TRYING,
NUTAG_REFER_EVENT(event),
TAG_END());
su_free(nh->nh_home, event);
}
......
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