tm: no reason modparams if compiled with no cancelr. support
[sip-router] / modules / tm / t_lookup.c
index 01f6a82..3a15580 100644 (file)
@@ -1265,8 +1265,10 @@ static inline void init_new_t(struct cell *new_cell, struct sip_msg *p_msg)
                                        (!cfg_get(tm, tm_cfg, tm_auto_inv_100) -1);
                new_cell->flags|=T_DISABLE_6xx &
                                        (!cfg_get(tm, tm_cfg, disable_6xx) -1);
+#ifdef CANCEL_REASON_SUPPORT
                new_cell->flags|=T_NO_E2E_CANCEL_REASON &
                                        (!!cfg_get(tm, tm_cfg, e2e_cancel_reason) -1);
+#endif /* CANCEL_REASON_SUPPORT */
                /* reset flags */
                new_cell->flags &=
                        (~ get_msgid_val(user_cell_reset_flags, p_msg->id, int));