Commit be713bec authored by Pekka Pessi's avatar Pekka Pessi
Browse files

Refactored nh_create_from_incoming().

darcs-hash:20051014132258-65a35-65a8679338e435e210638e9048e73eeabf133621.gz
parent 09e2d3be
......@@ -1554,10 +1554,10 @@ nua_handle_t *nh_create_from_incoming(nua_t *nua,
SIPTAG_FROM(from), /* Remote address */
TAG_END());
if (nh) {
nh_init(nh->nh_nua, nh, kind, default_allow, TAG_END());
if (nh && nh_init(nh->nh_nua, nh, kind, default_allow, TAG_END()) < 0)
nh_destroy(nua, nh), nh = NULL;
if (create_dialog) {
if (nh && create_dialog) {
struct nua_dialog_state *ds = nh->nh_ds;
dialog_get_peer_info(nh, sip);
......@@ -1574,7 +1574,6 @@ nua_handle_t *nh_create_from_incoming(nua_t *nua,
if (!ds->ds_leg)
nh_destroy(nua, nh), nh = NULL;
}
}
if (nh)
dialog_uas_route(nh, sip, 1);
......
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