Commit 200c70fe authored by Pekka Pessi's avatar Pekka Pessi

nua_stack.c: ensuring threadsafeness of messages sent to application

not sending internal events to application.

darcs-hash:20061027205225-65a35-801837b167f2a79ca7483db0cb293c3b070c1022.gz
parent 039eb30f
......@@ -260,7 +260,8 @@ int nua_stack_event(nua_t *nua, nua_handle_t *nh, msg_t *msg,
return event;
}
if ((event > nua_r_authenticate && event <= nua_r_ack)
if ((event > nua_r_authenticate && event <= nua_r_ack)
|| event < nua_i_error
|| (nh && !nh->nh_valid)
|| (nua->nua_shutdown && event != nua_r_shutdown)) {
if (msg)
......@@ -289,7 +290,8 @@ int nua_stack_event(nua_t *nua, nua_handle_t *nh, msg_t *msg,
e->e_nh = nh ? nua_handle_ref(nh) : nua->nua_dhandle;
e->e_status = status;
e->e_phrase = strcpy(end, phrase ? phrase : "");
e->e_msg = msg;
if (msg)
e->e_msg = msg, su_home_threadsafe(msg_home(msg));
if (su_msg_send(sumsg) != 0)
nua_handle_unref(nh);
......
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