git:master: dialog(k): Register dlg_tmcb_dummy in dialog_new_dlg() even when
Module: sip-router Branch: master Commit: 00d2d6b98739327a6eaaeeafa50023cf0c47b0f3 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=00d2d6b9... 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(). --- 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 a118a91..193f16a 100644 --- a/modules_k/dialog/dlg_handlers.c +++ b/modules_k/dialog/dlg_handlers.c @@ -716,12 +716,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;
participants (1)
-
Timo Reimann