Commit 592b6640 authored by Pekka Pessi's avatar Pekka Pessi

nua_register.c: added some logging to nua_register_connection_closed()

darcs-hash:20070725164833-65a35-1cb6607a660a41cdfc3bb12f8eb949dc003fd047.gz
parent b3bc6335
......@@ -1004,10 +1004,27 @@ void nua_register_connection_closed(tp_stack_t *sip_stack,
msg_t *msg,
int error)
{
if (tport_release(nr->nr_tport, nr->nr_error_report_id, NULL, NULL, nr, 0) < 0)
SU_DEBUG_1(("nua_register: tport_release() failed\n"));
tp_name_t const *tpn;
int pending = nr->nr_error_report_id;
assert(tport == nr->nr_tport);
if (!nr->nr_tport)
return;
if (tport_release(nr->nr_tport, pending, NULL, NULL, nr, 0) < 0)
SU_DEBUG_1(("nua_register: tport_release() failed\n"));
nr->nr_error_report_id = 0;
tpn = tport_name(nr->nr_tport);
SU_DEBUG_5(("nua_register(%p): tport to %s/%s:%s%s%s closed %s\n",
nua_dialog_usage_public(nr)->du_dialog->ds_owner,
tpn->tpn_proto, tpn->tpn_host, tpn->tpn_port,
tpn->tpn_comp ? ";comp=" : "",
tpn->tpn_comp ? tpn->tpn_comp : "",
error != 0 ? su_strerror(error) : ""));
tport_unref(nr->nr_tport), nr->nr_tport = NULL;
/* Schedule re-REGISTER immediately */
......
......@@ -311,6 +311,7 @@ int test_nua_init(struct context *ctx,
NUTAG_INSTANCE(ctx->b.instance),
/* Quicker timeout */
NTATAG_SIP_T1X64(2000),
TPTAG_KEEPALIVE(100),
TAG_IF(ctx->b.logging, TPTAG_LOG(1)),
TAG_END());
TEST_1(ctx->b.nua);
......
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