Module: sip-router Branch: sr_3.0 Commit: 00d56078199b4bc96d2f13fdfa19a2ddeb168669 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=00d56078...
Author: Timo Reimann timo.reimann@1und1.de Committer: Timo Reimann timo.reimann@1und1.de Date: Mon Mar 7 09:57:33 2011 +0100
dialog(k): Register dlg_tmcb_dummy in dialog_new_dlg() even when given transaction t is not available.
- Let tm's registration function deal with creating a transaction lazily. - Facilitates using dialogs (e.g., profiling) created on demand with dlg_manage(). (cherry picked from commit 00d2d6b98739327a6eaaeeafa50023cf0c47b0f3)
---
modules_k/dialog/dlg_handlers.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/modules_k/dialog/dlg_handlers.c b/modules_k/dialog/dlg_handlers.c index 5e5e3c5..9bedc60 100644 --- a/modules_k/dialog/dlg_handlers.c +++ b/modules_k/dialog/dlg_handlers.c @@ -629,12 +629,10 @@ int dlg_new_dialog(struct sip_msg *msg, struct cell *t) if (_dlg_ctx.to_bye!=0) dlg->dflags |= DLG_FLAG_TOBYE;
- if (t) { - if ( d_tmb.register_tmcb( msg, t, TMCB_MAX, - dlg_tmcb_dummy, (void*)dlg, 0)<0 ) { - LM_ERR("failed cache in T the shortcut to dlg\n"); - goto error; - } + if ( d_tmb.register_tmcb( msg, t, TMCB_MAX, + dlg_tmcb_dummy, (void*)dlg, 0)<0 ) { + LM_ERR("failed cache in T the shortcut to dlg\n"); + goto error; } #if 0 t->dialog_ctx = (void*) dlg;