tm: no reason modparams if compiled with no cancelr. support
[sip-router] / modules / tm / tm.c
index 221be3b..6dff2ca 100644 (file)
@@ -284,8 +284,10 @@ static int w_t_reset_max_lifetime(struct sip_msg* msg, char* foo, char* bar);
 static int t_set_auto_inv_100(struct sip_msg* msg, char* on_off, char* foo);
 static int t_set_disable_6xx(struct sip_msg* msg, char* on_off, char* foo);
 static int t_set_disable_failover(struct sip_msg* msg, char* on_off, char* f);
+#ifdef CANCEL_REASON_SUPPORT
 static int t_set_no_e2e_cancel_reason(struct sip_msg* msg, char* on_off,
                                                                                char* f);
+#endif /* CANCEL_REASON_SUPPORT */
 static int t_branch_timeout(struct sip_msg* msg, char*, char*);
 static int t_branch_replied(struct sip_msg* msg, char*, char*);
 static int t_any_timeout(struct sip_msg* msg, char*, char*);
@@ -431,6 +433,7 @@ static cmd_export_t cmds[]={
                        REQUEST_ROUTE|TM_ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE },
        {"t_set_disable_failover", t_set_disable_failover, 1, fixup_var_int_1,
                        REQUEST_ROUTE|TM_ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE },
+#ifdef CANCEL_REASON_SUPPORT
        {"t_set_no_e2e_cancel_reason", t_set_no_e2e_cancel_reason, 1,
                fixup_var_int_1,
                        REQUEST_ROUTE|TM_ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE },
@@ -438,6 +441,7 @@ static cmd_export_t cmds[]={
        {"t_disable_e2e_cancel_reason", t_set_no_e2e_cancel_reason, 1,
                fixup_var_int_1,
                        REQUEST_ROUTE|TM_ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE },
+#endif /* CANCEL_REASON_SUPPORT */
        {"t_branch_timeout",  t_branch_timeout,         0, 0,  FAILURE_ROUTE},
        {"t_branch_replied",  t_branch_replied,         0, 0,  FAILURE_ROUTE},
        {"t_any_timeout",     t_any_timeout,            0, 0, 
@@ -545,8 +549,10 @@ static param_export_t params[]={
        {"contacts_avp",        PARAM_STRING, &contacts_avp_param                },
        {"disable_6xx_block",   PARAM_INT, &default_tm_cfg.disable_6xx           },
        {"local_ack_mode",      PARAM_INT, &default_tm_cfg.local_ack_mode        },
+#ifdef CANCEL_REASON_SUPPORT
        {"local_cancel_reason", PARAM_INT, &default_tm_cfg.local_cancel_reason   },
        {"e2e_cancel_reason",   PARAM_INT, &default_tm_cfg.e2e_cancel_reason     },
+#endif /* CANCEL_REASON_SUPPORT */
        {0,0,0}
 };
 
@@ -1748,8 +1754,10 @@ T_SET_FLAG_GEN_FUNC(t_set_disable_6xx, T_DISABLE_6xx)
 T_SET_FLAG_GEN_FUNC(t_set_disable_failover, T_DISABLE_FAILOVER)
 
 
+#ifdef CANCEL_REASON_SUPPORT
 /* disable/enable e2e cancel reason copy for the current transaction */
 T_SET_FLAG_GEN_FUNC(t_set_no_e2e_cancel_reason, T_NO_E2E_CANCEL_REASON)
+#endif /* CANCEL_REASON_SUPPORT */
 
 
 /* script function, FAILURE_ROUTE only, returns true if the