Commit 09cba51b authored by Pekka Pessi's avatar Pekka Pessi

nua_stack.c: nua_server_request(): store dialog info if create_dialog is true

darcs-hash:20061017155418-65a35-69090423a55a63392f2b1465fb145bf5a484f6ee.gz
parent bad1ec3d
......@@ -1762,9 +1762,16 @@ nua_server_request_t *nua_server_request(nua_t *nua,
SR_STATUS1(sr, SIP_500_INTERNAL_SERVER_ERROR);
/* Create handle if request does not fail */
if (initial && sr->sr_status < 300)
if (sr->sr_status >= 300)
;
else if (initial) {
if (!(nh = nua_stack_incoming_handle(nua, irq, sip, create_dialog)))
SR_STATUS1(sr, SIP_500_INTERNAL_SERVER_ERROR);
}
else if (create_dialog) {
nua_dialog_store_peer_info(nh, nh->nh_ds, sip);
nua_dialog_uas_route(nh, nh->nh_ds, sip, 1);
}
if (nh == NULL)
nh = nua->nua_dhandle;
......@@ -1856,7 +1863,7 @@ int nua_stack_server_event(nua_t *nua,
nua_server_request_destroy(sr);
if (nh)
if (nh && nh != nua->nua_dhandle)
nh_destroy(nua, 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