浏览代码

tm: remove CANCEL_REASON_SUPPORT #define, activated as default since 2010

- remove CANCEL_REASON_SUPPORT #define from module
- remove now unneeded defs.h include file
- activated as default since commit bf5d1d6f1df303019ccf4 in 2010
- tm does not compile anymore if deactivated
Henning Westerholt 6 年之前
父节点
当前提交
50b0e5398b

+ 0 - 2
src/modules/tm/config.h

@@ -27,8 +27,6 @@
 #ifndef _TM_CONFIG_H
 #ifndef _TM_CONFIG_H
 #define _TM_CONFIG_H
 #define _TM_CONFIG_H
 
 
-#include "defs.h"
-
 /* this is where table size is defined now -- sort of
 /* this is where table size is defined now -- sort of
    ugly, core should not be bothered by TM table size,
    ugly, core should not be bothered by TM table size,
    but on the other, core's stateless forwarding should
    but on the other, core's stateless forwarding should

+ 0 - 38
src/modules/tm/defs.h

@@ -1,38 +0,0 @@
-/*
- *
- * Copyright (C) 2001-2003 FhG Fokus
- *
- * This file is part of Kamailio, a free SIP server.
- *
- * Kamailio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version
- *
- * Kamailio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- */
-
-/*!
- * \file
- * \brief TM :: Definitions
- * \ingroup tm
- */
-
-
-#ifndef _TM_DEFS_H
-#define _TM_DEFS_H
-
-/* CANCEL_REASON_SUPPORT on by default */
-#ifndef NO_CANCEL_REASON_SUPPORT
-#define CANCEL_REASON_SUPPORT
-#endif /* NO_CANCEL_REASON_SUPPORT */
-
-#endif

+ 0 - 3
src/modules/tm/h_table.c

@@ -37,7 +37,6 @@
 #include "../../core/error.h"
 #include "../../core/error.h"
 #include "../../core/char_msg_val.h"
 #include "../../core/char_msg_val.h"
 #include "../../core/rand/kam_rand.h"
 #include "../../core/rand/kam_rand.h"
-#include "defs.h"
 #include "t_reply.h"
 #include "t_reply.h"
 #include "t_cancel.h"
 #include "t_cancel.h"
 #include "t_stats.h"
 #include "t_stats.h"
@@ -171,10 +170,8 @@ void free_cell_helper(
 		sip_msg_free_unsafe(dead_cell->uas.request);
 		sip_msg_free_unsafe(dead_cell->uas.request);
 	if(dead_cell->uas.response.buffer)
 	if(dead_cell->uas.response.buffer)
 		shm_free_unsafe(dead_cell->uas.response.buffer);
 		shm_free_unsafe(dead_cell->uas.response.buffer);
-#ifdef CANCEL_REASON_SUPPORT
 	if(unlikely(dead_cell->uas.cancel_reas))
 	if(unlikely(dead_cell->uas.cancel_reas))
 		shm_free_unsafe(dead_cell->uas.cancel_reas);
 		shm_free_unsafe(dead_cell->uas.cancel_reas);
-#endif /* CANCEL_REASON_SUPPORT */
 
 
 	/* callbacks */
 	/* callbacks */
 	for(cbs = (struct tm_callback *)dead_cell->tmcb_hl.first; cbs;) {
 	for(cbs = (struct tm_callback *)dead_cell->tmcb_hl.first; cbs;) {

+ 0 - 5
src/modules/tm/h_table.h

@@ -28,7 +28,6 @@
 #ifndef _H_TABLE_H
 #ifndef _H_TABLE_H
 #define _H_TABLE_H
 #define _H_TABLE_H
 
 
-#include "defs.h"
 #include "t_stats.h"
 #include "t_stats.h"
 
 
 /* uncomment the next define if you wish to keep hash statistics*/
 /* uncomment the next define if you wish to keep hash statistics*/
@@ -170,10 +169,8 @@ typedef struct ua_server
 	 * we need them for dialog-wise matching of ACKs;
 	 * we need them for dialog-wise matching of ACKs;
 	 * the pointer shows to shmem-ed reply */
 	 * the pointer shows to shmem-ed reply */
 	str local_totag;
 	str local_totag;
-#ifdef CANCEL_REASON_SUPPORT
 	struct cancel_reason *cancel_reas; /* pointer to cancel reason, used
 	struct cancel_reason *cancel_reas; /* pointer to cancel reason, used
 										* for e2e cancels */
 										* for e2e cancels */
-#endif /* CANCEL_REASON_SUPPORT */
 	unsigned int status;
 	unsigned int status;
 } tm_ua_server_t;
 } tm_ua_server_t;
 
 
@@ -284,9 +281,7 @@ typedef struct async_state
 
 
 #define T_DISABLE_6xx (1 << 8)		/* treat 6xx as a normal reply */
 #define T_DISABLE_6xx (1 << 8)		/* treat 6xx as a normal reply */
 #define T_DISABLE_FAILOVER (1 << 9) /* don't perform dns failover */
 #define T_DISABLE_FAILOVER (1 << 9) /* don't perform dns failover */
-#ifdef CANCEL_REASON_SUPPORT
 #define T_NO_E2E_CANCEL_REASON (1 << 10) /* don't propagate CANCEL Reason */
 #define T_NO_E2E_CANCEL_REASON (1 << 10) /* don't propagate CANCEL Reason */
-#endif									 /* CANCEL_REASON_SUPPORT */
 #define T_DONT_FORK (T_CANCELED | T_6xx)
 #define T_DONT_FORK (T_CANCELED | T_6xx)
 
 
 #ifdef WITH_AS_SUPPORT
 #ifdef WITH_AS_SUPPORT

+ 0 - 3
src/modules/tm/lock.c

@@ -19,9 +19,6 @@
  */
  */
 
 
 
 
-#include "defs.h"
-
-
 #include <errno.h>
 #include <errno.h>
 
 
 #include "lock.h"
 #include "lock.h"

+ 0 - 2
src/modules/tm/lock.h

@@ -18,8 +18,6 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
  */
 
 
-#include "defs.h"
-
 
 
 #ifndef __lock_h
 #ifndef __lock_h
 #define __lock_h
 #define __lock_h

+ 0 - 2
src/modules/tm/sip_msg.c

@@ -41,8 +41,6 @@
  * @ingroup tm
  * @ingroup tm
  */
  */
 
 
-#include "defs.h"
-
 
 
 #include "sip_msg.h"
 #include "sip_msg.h"
 #include "../../core/dprint.h"
 #include "../../core/dprint.h"

+ 0 - 2
src/modules/tm/sip_msg.h

@@ -43,8 +43,6 @@
 #ifndef _SIP_MSG_H
 #ifndef _SIP_MSG_H
 #define _SIP_MSG_H
 #define _SIP_MSG_H
 
 
-#include "defs.h"
-
 
 
 #include "../../core/parser/msg_parser.h"
 #include "../../core/parser/msg_parser.h"
 #include "../../core/mem/shm_mem.h"
 #include "../../core/mem/shm_mem.h"

+ 0 - 2
src/modules/tm/t_append_branches.h

@@ -28,8 +28,6 @@
 #ifndef _T_APPEND_BRANCHES_H
 #ifndef _T_APPEND_BRANCHES_H
 #define _T_APPEND_BRANCHES_H
 #define _T_APPEND_BRANCHES_H
 
 
-#include "defs.h"
-
 #include "../../core/proxy.h"
 #include "../../core/proxy.h"
 #include "h_table.h"
 #include "h_table.h"
 
 

+ 0 - 9
src/modules/tm/t_cancel.c

@@ -24,7 +24,6 @@
 #include <assert.h>
 #include <assert.h>
 #endif /* EXTRA_DEBUG */
 #endif /* EXTRA_DEBUG */
 
 
-#include "defs.h"
 #include "config.h"
 #include "config.h"
 
 
 #include "t_funcs.h"
 #include "t_funcs.h"
@@ -126,9 +125,7 @@ int cancel_uacs( struct cell *t, struct cancel_info* cancel_data, int flags)
 			r=cancel_branch(
 			r=cancel_branch(
 				t,
 				t,
 				i,
 				i,
-#ifdef CANCEL_REASON_SUPPORT
 				&cancel_data->reason,
 				&cancel_data->reason,
-#endif /* CANCEL_REASON_SUPPORT */
 				flags | ((t->uac[i].request.buffer==NULL)?
 				flags | ((t->uac[i].request.buffer==NULL)?
 					F_CANCEL_B_FAKE_REPLY:0) /* blind UAC? */
 					F_CANCEL_B_FAKE_REPLY:0) /* blind UAC? */
 			);
 			);
@@ -207,9 +204,7 @@ int cancel_all_uacs(struct cell *trans, int how)
  *           atomic_cmpxhcg or atomic_get_and_set _must_ be used.
  *           atomic_cmpxhcg or atomic_get_and_set _must_ be used.
  */
  */
 int cancel_branch( struct cell *t, int branch,
 int cancel_branch( struct cell *t, int branch,
-	#ifdef CANCEL_REASON_SUPPORT
 					struct cancel_reason* reason,
 					struct cancel_reason* reason,
-	#endif /* CANCEL_REASON_SUPPORT */
 					int flags )
 					int flags )
 {
 {
 	char *cancel;
 	char *cancel;
@@ -287,16 +282,12 @@ int cancel_branch( struct cell *t, int branch,
 		/* build the CANCEL from the INVITE which was sent out */
 		/* build the CANCEL from the INVITE which was sent out */
 		cancel = build_local_reparse(t, branch, &len, CANCEL, CANCEL_LEN,
 		cancel = build_local_reparse(t, branch, &len, CANCEL, CANCEL_LEN,
 									 (t->uas.request && t->uas.request->msg_flags&FL_USE_UAC_TO)?0:&t->to
 									 (t->uas.request && t->uas.request->msg_flags&FL_USE_UAC_TO)?0:&t->to
-	#ifdef CANCEL_REASON_SUPPORT
 									 , reason
 									 , reason
-	#endif /* CANCEL_REASON_SUPPORT */
 									 );
 									 );
 	} else {
 	} else {
 		/* build the CANCEL from the received INVITE */
 		/* build the CANCEL from the received INVITE */
 		cancel = build_local(t, branch, &len, CANCEL, CANCEL_LEN, &t->to
 		cancel = build_local(t, branch, &len, CANCEL, CANCEL_LEN, &t->to
-	#ifdef CANCEL_REASON_SUPPORT
 								, reason
 								, reason
-	#endif /* CANCEL_REASON_SUPPORT */
 								);
 								);
 	}
 	}
 	if (!cancel) {
 	if (!cancel) {

+ 0 - 3
src/modules/tm/t_cancel.h

@@ -26,7 +26,6 @@
 #include <stdio.h> /* just for FILE* for fifo_uac_cancel */
 #include <stdio.h> /* just for FILE* for fifo_uac_cancel */
 #include "../../core/rpc.h"
 #include "../../core/rpc.h"
 #include "../../core/atomic_ops.h"
 #include "../../core/atomic_ops.h"
-#include "defs.h"
 #include "h_table.h"
 #include "h_table.h"
 #include "t_reply.h"
 #include "t_reply.h"
 
 
@@ -65,9 +64,7 @@ void prepare_to_cancel(struct cell *t, branch_bm_t *cancel_bm, branch_bm_t s);
 int cancel_uacs( struct cell *t, struct cancel_info* cancel_data, int flags );
 int cancel_uacs( struct cell *t, struct cancel_info* cancel_data, int flags );
 int cancel_all_uacs(struct cell *trans, int how);
 int cancel_all_uacs(struct cell *trans, int how);
 int cancel_branch( struct cell *t, int branch,
 int cancel_branch( struct cell *t, int branch,
-#ifdef CANCEL_REASON_SUPPORT
 					struct cancel_reason* reason,
 					struct cancel_reason* reason,
-#endif /* CANCEL_REASON_SUPPORT */
 					int flags );
 					int flags );
 
 
 typedef int(*cancel_uacs_f)(struct cell *t, struct cancel_info* cancel_data,
 typedef int(*cancel_uacs_f)(struct cell *t, struct cancel_info* cancel_data,

+ 0 - 1
src/modules/tm/t_funcs.c

@@ -32,7 +32,6 @@
 #include "../../core/mem/mem.h"
 #include "../../core/mem/mem.h"
 #include "../../core/sr_compat.h"
 #include "../../core/sr_compat.h"
 #include "../../core/pvar.h"
 #include "../../core/pvar.h"
-#include "defs.h"
 #include "t_funcs.h"
 #include "t_funcs.h"
 #include "t_fwd.h"
 #include "t_fwd.h"
 #include "t_lookup.h"
 #include "t_lookup.h"

+ 0 - 2
src/modules/tm/t_funcs.h

@@ -23,8 +23,6 @@
 #ifndef _T_FUNCS_H
 #ifndef _T_FUNCS_H
 #define _T_FUNCS_H
 #define _T_FUNCS_H
 
 
-#include "defs.h"
-
 
 
 #include <errno.h>
 #include <errno.h>
 #include <netdb.h>
 #include <netdb.h>

+ 1 - 14
src/modules/tm/t_fwd.c

@@ -18,8 +18,6 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
  */
 
 
-#include "defs.h"
-
 
 
 #include "../../core/dprint.h"
 #include "../../core/dprint.h"
 #include "../../core/config.h"
 #include "../../core/config.h"
@@ -1105,9 +1103,7 @@ int e2e_cancel_branch( struct sip_msg *cancel_msg, struct cell *t_cancel,
 		}
 		}
 		shbuf=build_local_reparse( t_invite, branch, &len, CANCEL,
 		shbuf=build_local_reparse( t_invite, branch, &len, CANCEL,
 				CANCEL_LEN, &t_invite->to
 				CANCEL_LEN, &t_invite->to
-#ifdef CANCEL_REASON_SUPPORT
 				, 0
 				, 0
-#endif /* CANCEL_REASON_SUPPORT */
 				);
 				);
 		if (unlikely(!shbuf)) {
 		if (unlikely(!shbuf)) {
 			LM_ERR("printing e2e cancel failed\n");
 			LM_ERR("printing e2e cancel failed\n");
@@ -1142,7 +1138,6 @@ error:
 
 
 
 
 
 
-#ifdef CANCEL_REASON_SUPPORT
 /** create a cancel reason structure packed into a single shm. block.
 /** create a cancel reason structure packed into a single shm. block.
  * From a cause and a pointer to a str or cancel_msg, build a
  * From a cause and a pointer to a str or cancel_msg, build a
  * packed cancel reason structure (CANCEL_REAS_PACKED_HDRS), using a
  * packed cancel reason structure (CANCEL_REAS_PACKED_HDRS), using a
@@ -1242,7 +1237,6 @@ static struct cancel_reason* cancel_reason_pack(short cause, void* data,
 error:
 error:
 	return 0;
 	return 0;
 }
 }
-#endif /* CANCEL_REASON_SUPPORT */
 
 
 
 
 
 
@@ -1252,10 +1246,9 @@ void e2e_cancel( struct sip_msg *cancel_msg,
 	branch_bm_t cancel_bm;
 	branch_bm_t cancel_bm;
 #ifndef E2E_CANCEL_HOP_BY_HOP
 #ifndef E2E_CANCEL_HOP_BY_HOP
 	branch_bm_t tmp_bm;
 	branch_bm_t tmp_bm;
-#elif defined (CANCEL_REASON_SUPPORT)
+#endif /* E2E_CANCEL_HOP_BY_HOP */
 	struct cancel_reason* reason;
 	struct cancel_reason* reason;
 	int free_reason;
 	int free_reason;
-#endif /* E2E_CANCEL_HOP_BY_HOP */
 	int i;
 	int i;
 	int lowest_error;
 	int lowest_error;
 	int ret;
 	int ret;
@@ -1310,7 +1303,6 @@ void e2e_cancel( struct sip_msg *cancel_msg,
 	 * have 0 branches and we check for the branch number in
 	 * have 0 branches and we check for the branch number in
 	 * t_reply_matching() ).
 	 * t_reply_matching() ).
 	 */
 	 */
-#ifdef CANCEL_REASON_SUPPORT
 	free_reason = 0;
 	free_reason = 0;
 	reason = 0;
 	reason = 0;
 	if (likely(t_invite->uas.cancel_reas == 0)){
 	if (likely(t_invite->uas.cancel_reas == 0)){
@@ -1324,7 +1316,6 @@ void e2e_cancel( struct sip_msg *cancel_msg,
 			free_reason = 1;
 			free_reason = 1;
 		}
 		}
 	}
 	}
-#endif /* CANCEL_REASON_SUPPORT */
 	for (i=0; i<t_invite->nr_of_outgoings; i++) {
 	for (i=0; i<t_invite->nr_of_outgoings; i++) {
 		if (cancel_bm & (1<<i)) {
 		if (cancel_bm & (1<<i)) {
 			/* it's safe to get the reply lock since e2e_cancel is
 			/* it's safe to get the reply lock since e2e_cancel is
@@ -1334,9 +1325,7 @@ void e2e_cancel( struct sip_msg *cancel_msg,
 			ret=cancel_branch(
 			ret=cancel_branch(
 					t_invite,
 					t_invite,
 					i,
 					i,
-#ifdef CANCEL_REASON_SUPPORT
 					reason,
 					reason,
-#endif /* CANCEL_REASON_SUPPORT */
 					cfg_get(tm,tm_cfg, cancel_b_flags)
 					cfg_get(tm,tm_cfg, cancel_b_flags)
 					| ((t_invite->uac[i].request.buffer==NULL)?
 					| ((t_invite->uac[i].request.buffer==NULL)?
 						F_CANCEL_B_FAKE_REPLY:0) /* blind UAC? */
 						F_CANCEL_B_FAKE_REPLY:0) /* blind UAC? */
@@ -1345,12 +1334,10 @@ void e2e_cancel( struct sip_msg *cancel_msg,
 			if (ret<lowest_error) lowest_error=ret;
 			if (ret<lowest_error) lowest_error=ret;
 		}
 		}
 	}
 	}
-#ifdef CANCEL_REASON_SUPPORT
 	if (unlikely(free_reason)) {
 	if (unlikely(free_reason)) {
 		/* reason was not set as the global reason => free it */
 		/* reason was not set as the global reason => free it */
 		shm_free(reason);
 		shm_free(reason);
 	}
 	}
-#endif /* CANCEL_REASON_SUPPORT */
 #else /* ! E2E_CANCEL_HOP_BY_HOP */
 #else /* ! E2E_CANCEL_HOP_BY_HOP */
 	/* fix label -- it must be same for reply matching (the label is part of
 	/* fix label -- it must be same for reply matching (the label is part of
 	 * the generated via branch for the cancels sent upstream and if it
 	 * the generated via branch for the cancels sent upstream and if it

+ 0 - 2
src/modules/tm/t_fwd.h

@@ -21,8 +21,6 @@
 #ifndef _T_FWD_H
 #ifndef _T_FWD_H
 #define _T_FWD_H
 #define _T_FWD_H
 
 
-#include "defs.h"
-
 #include "../../core/proxy.h"
 #include "../../core/proxy.h"
 #include "h_table.h"
 #include "h_table.h"
 
 

+ 0 - 2
src/modules/tm/t_hooks.c

@@ -18,8 +18,6 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
  */
 
 
-#include "defs.h"
-
 
 
 #include "stdlib.h"
 #include "stdlib.h"
 #include "../../core/dprint.h"
 #include "../../core/dprint.h"

+ 0 - 2
src/modules/tm/t_hooks.h

@@ -23,8 +23,6 @@
 #ifndef _HOOKS_H
 #ifndef _HOOKS_H
 #define _HOOKS_H
 #define _HOOKS_H
 
 
-#include "defs.h"
-
 /* TMCB_ONSEND used to enable certain callback-related features when
 /* TMCB_ONSEND used to enable certain callback-related features when
  * ONSEND was set, these days it's always enabled. For compatibility
  * ONSEND was set, these days it's always enabled. For compatibility
  * reasons with modules that check ONSEND, continue to set it
  * reasons with modules that check ONSEND, continue to set it

+ 0 - 4
src/modules/tm/t_lookup.c

@@ -37,8 +37,6 @@
  *
  *
  */
  */
 
 
-#include "defs.h"
-
 
 
 #include "../../core/comp_defs.h"
 #include "../../core/comp_defs.h"
 #include "../../core/compiler_opt.h"
 #include "../../core/compiler_opt.h"
@@ -1216,10 +1214,8 @@ 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);
 			(!cfg_get(tm, tm_cfg, tm_auto_inv_100) -1);
 		new_cell->flags|=T_DISABLE_6xx &
 		new_cell->flags|=T_DISABLE_6xx &
 			(!cfg_get(tm, tm_cfg, disable_6xx) -1);
 			(!cfg_get(tm, tm_cfg, disable_6xx) -1);
-#ifdef CANCEL_REASON_SUPPORT
 		new_cell->flags|=T_NO_E2E_CANCEL_REASON &
 		new_cell->flags|=T_NO_E2E_CANCEL_REASON &
 			(!!cfg_get(tm, tm_cfg, e2e_cancel_reason) -1);
 			(!!cfg_get(tm, tm_cfg, e2e_cancel_reason) -1);
-#endif /* CANCEL_REASON_SUPPORT */
 		/* reset flags */
 		/* reset flags */
 		new_cell->flags &=
 		new_cell->flags &=
 			(~ get_msgid_val(user_cell_reset_flags, p_msg->id, int));
 			(~ get_msgid_val(user_cell_reset_flags, p_msg->id, int));

+ 0 - 2
src/modules/tm/t_lookup.h

@@ -23,8 +23,6 @@
 #ifndef _T_LOOKUP_H
 #ifndef _T_LOOKUP_H
 #define _T_LOOKUP_H
 #define _T_LOOKUP_H
 
 
-#include "defs.h"
-
 
 
 #include "config.h"
 #include "config.h"
 #include "t_funcs.h"
 #include "t_funcs.h"

+ 1 - 21
src/modules/tm/t_msgbuilder.c

@@ -21,7 +21,6 @@
  *
  *
  */
  */
 
 
-#include "defs.h"
 
 
 #ifdef EXTRA_DEBUG
 #ifdef EXTRA_DEBUG
 #include <assert.h>
 #include <assert.h>
@@ -60,9 +59,7 @@
  */
  */
 char *build_local(struct cell *Trans,unsigned int branch,
 char *build_local(struct cell *Trans,unsigned int branch,
 	unsigned int *len, char *method, int method_len, str *to
 	unsigned int *len, char *method, int method_len, str *to
-#ifdef CANCEL_REASON_SUPPORT
 	, struct cancel_reason* reason
 	, struct cancel_reason* reason
-#endif /* CANCEL_REASON_SUPPORT */
 	)
 	)
 {
 {
 	char                *cancel_buf, *p, *via;
 	char                *cancel_buf, *p, *via;
@@ -73,10 +70,8 @@ char *build_local(struct cell *Trans,unsigned int branch,
 	str branch_str;
 	str branch_str;
 	str via_id;
 	str via_id;
 	struct hostport hp;
 	struct hostport hp;
-#ifdef CANCEL_REASON_SUPPORT
 	int reason_len, code_len;
 	int reason_len, code_len;
 	struct hdr_field *reas1, *reas_last;
 	struct hdr_field *reas1, *reas_last;
-#endif /* CANCEL_REASON_SUPPORT */
 
 
 	/* init */
 	/* init */
 	via_id.s=0;
 	via_id.s=0;
@@ -139,7 +134,6 @@ char *build_local(struct cell *Trans,unsigned int branch,
 	}
 	}
 	/* Content Length, EoM */
 	/* Content Length, EoM */
 	*len+=CONTENT_LENGTH_LEN+1 + CRLF_LEN;
 	*len+=CONTENT_LENGTH_LEN+1 + CRLF_LEN;
-#ifdef CANCEL_REASON_SUPPORT
 	reason_len = 0;
 	reason_len = 0;
 	reas1 = 0;
 	reas1 = 0;
 	reas_last = 0;
 	reas_last = 0;
@@ -172,7 +166,6 @@ char *build_local(struct cell *Trans,unsigned int branch,
 			LM_BUG("unhandled reason cause %d\n", reason->cause);
 			LM_BUG("unhandled reason cause %d\n", reason->cause);
 	}
 	}
 	*len+= reason_len;
 	*len+= reason_len;
-#endif /* CANCEL_REASON_SUPPORT */
 	*len+= CRLF_LEN; /* end of msg. */
 	*len+= CRLF_LEN; /* end of msg. */
 
 
 	cancel_buf=shm_malloc( *len+1 );
 	cancel_buf=shm_malloc( *len+1 );
@@ -215,7 +208,6 @@ char *build_local(struct cell *Trans,unsigned int branch,
 	}
 	}
 	/* Content Length */
 	/* Content Length */
 	append_str(p, CONTENT_LENGTH "0" CRLF, CONTENT_LENGTH_LEN + 1 + CRLF_LEN);
 	append_str(p, CONTENT_LENGTH "0" CRLF, CONTENT_LENGTH_LEN + 1 + CRLF_LEN);
-#ifdef CANCEL_REASON_SUPPORT
 	/* add reason if needed */
 	/* add reason if needed */
 	if (reason_len) {
 	if (reason_len) {
 		if (likely(reason->cause > 0)) {
 		if (likely(reason->cause > 0)) {
@@ -243,7 +235,6 @@ char *build_local(struct cell *Trans,unsigned int branch,
 			}
 			}
 		}
 		}
 	}
 	}
-#endif /* CANCEL_REASON_SUPPORT */
 	append_str(p, CRLF, CRLF_LEN); /* msg. end */
 	append_str(p, CRLF, CRLF_LEN); /* msg. end */
 	*p=0;
 	*p=0;
 
 
@@ -263,9 +254,7 @@ error:
  */
  */
 char *build_local_reparse(struct cell *Trans,unsigned int branch,
 char *build_local_reparse(struct cell *Trans,unsigned int branch,
 	unsigned int *len, char *method, int method_len, str *to
 	unsigned int *len, char *method, int method_len, str *to
-#ifdef CANCEL_REASON_SUPPORT
 	, struct cancel_reason *reason
 	, struct cancel_reason *reason
-#endif /* CANCEL_REASON_SUPPORT */
 	)
 	)
 {
 {
 	char	*invite_buf, *invite_buf_end;
 	char	*invite_buf, *invite_buf_end;
@@ -275,10 +264,8 @@ char *build_local_reparse(struct cell *Trans,unsigned int branch,
 	enum _hdr_types_t	hf_type;
 	enum _hdr_types_t	hf_type;
 	int	first_via, to_len;
 	int	first_via, to_len;
 	int cancel_buf_len;
 	int cancel_buf_len;
-#ifdef CANCEL_REASON_SUPPORT
 	int reason_len, code_len;
 	int reason_len, code_len;
 	struct hdr_field *reas1, *reas_last, *hdr;
 	struct hdr_field *reas1, *reas_last, *hdr;
-#endif /* CANCEL_REASON_SUPPORT */
 	int hadded = 0;
 	int hadded = 0;
 	sr_cfgenv_t *cenv = NULL;
 	sr_cfgenv_t *cenv = NULL;
 
 
@@ -295,7 +282,6 @@ char *build_local_reparse(struct cell *Trans,unsigned int branch,
 		goto error;
 		goto error;
 	}
 	}
 
 
-#ifdef CANCEL_REASON_SUPPORT
 	reason_len = 0;
 	reason_len = 0;
 	reas1 = 0;
 	reas1 = 0;
 	reas_last = 0;
 	reas_last = 0;
@@ -327,7 +313,6 @@ char *build_local_reparse(struct cell *Trans,unsigned int branch,
 		} else if (unlikely(reason->cause < CANCEL_REAS_MIN))
 		} else if (unlikely(reason->cause < CANCEL_REAS_MIN))
 			LM_BUG("unhandled reason cause %d\n", reason->cause);
 			LM_BUG("unhandled reason cause %d\n", reason->cause);
 	}
 	}
-#endif /* CANCEL_REASON_SUPPORT */
 
 
 	invite_buf_end = invite_buf + invite_len;
 	invite_buf_end = invite_buf + invite_len;
 	s = invite_buf;
 	s = invite_buf;
@@ -337,11 +322,8 @@ char *build_local_reparse(struct cell *Trans,unsigned int branch,
 	I just extend it with the length of new To HF to be sure.
 	I just extend it with the length of new To HF to be sure.
 	Ugly, but we avoid lots of checks and memory allocations this way */
 	Ugly, but we avoid lots of checks and memory allocations this way */
 	to_len = to ? to->len : 0;
 	to_len = to ? to->len : 0;
-#ifdef CANCEL_REASON_SUPPORT
 	cancel_buf_len = invite_len + to_len + reason_len;
 	cancel_buf_len = invite_len + to_len + reason_len;
-#else
-	cancel_buf_len = invite_len + to_len;
-#endif /* CANCEL_REASON_SUPPORT */
+
 	cancel_buf = shm_malloc(sizeof(char)*cancel_buf_len);
 	cancel_buf = shm_malloc(sizeof(char)*cancel_buf_len);
 	if (!cancel_buf)
 	if (!cancel_buf)
 	{
 	{
@@ -437,7 +419,6 @@ char *build_local_reparse(struct cell *Trans,unsigned int branch,
 
 
 			case HDR_EOH_T:
 			case HDR_EOH_T:
 				/* end of SIP message found */
 				/* end of SIP message found */
-#ifdef CANCEL_REASON_SUPPORT
 				/* add reason if needed */
 				/* add reason if needed */
 				if (reason_len) {
 				if (reason_len) {
 					/* if reason_len !=0, no need for any reason enabled
 					/* if reason_len !=0, no need for any reason enabled
@@ -470,7 +451,6 @@ char *build_local_reparse(struct cell *Trans,unsigned int branch,
 						}
 						}
 					}
 					}
 				}
 				}
-#endif /* CANCEL_REASON_SUPPORT */
 				/* final (end-of-headers) CRLF */
 				/* final (end-of-headers) CRLF */
 				append_str(d, CRLF, CRLF_LEN);
 				append_str(d, CRLF, CRLF_LEN);
 				*len = d - cancel_buf;
 				*len = d - cancel_buf;

+ 0 - 5
src/modules/tm/t_msgbuilder.h

@@ -24,7 +24,6 @@
 #define _MSGBUILDER_H
 #define _MSGBUILDER_H
 
 
 #include "../../core/ip_addr.h"
 #include "../../core/ip_addr.h"
-#include "defs.h"
 #include "dlg.h"
 #include "dlg.h"
 #include "h_table.h"
 #include "h_table.h"
 #include "t_reply.h"
 #include "t_reply.h"
@@ -49,16 +48,12 @@
 
 
 char *build_local(struct cell *Trans, unsigned int branch,
 char *build_local(struct cell *Trans, unsigned int branch,
 	unsigned int *len, char *method, int method_len, str *to
 	unsigned int *len, char *method, int method_len, str *to
-#ifdef CANCEL_REASON_SUPPORT
 	, struct cancel_reason* reason
 	, struct cancel_reason* reason
-#endif /* CANCEL_REASON_SUPPORT */
 	);
 	);
 
 
 char *build_local_reparse(struct cell *Trans, unsigned int branch,
 char *build_local_reparse(struct cell *Trans, unsigned int branch,
 	unsigned int *len, char *method, int method_len, str *to
 	unsigned int *len, char *method, int method_len, str *to
-#ifdef CANCEL_REASON_SUPPORT
 	, struct cancel_reason* reason
 	, struct cancel_reason* reason
-#endif /* CANCEL_REASON_SUPPORT */
 	);
 	);
 
 
 char *build_uac_request(  str msg_type, str dst, str from,
 char *build_uac_request(  str msg_type, str dst, str from,

+ 0 - 15
src/modules/tm/t_reply.c

@@ -57,7 +57,6 @@
 #include "../../core/cfg_core.h" /* cfg_get(core, core_cfg, use_dns_failover) */
 #include "../../core/cfg_core.h" /* cfg_get(core, core_cfg, use_dns_failover) */
 #endif
 #endif
 
 
-#include "defs.h"
 #include "config.h"
 #include "config.h"
 #include "h_table.h"
 #include "h_table.h"
 #include "t_hooks.h"
 #include "t_hooks.h"
@@ -353,17 +352,13 @@ static char *build_ack(struct sip_msg* rpl,struct cell *trans,int branch,
 		/* build the ACK from the INVITE which was sent out */
 		/* build the ACK from the INVITE which was sent out */
 		return build_local_reparse( trans, branch, ret_len,
 		return build_local_reparse( trans, branch, ret_len,
 					ACK, ACK_LEN, &to
 					ACK, ACK_LEN, &to
-	#ifdef CANCEL_REASON_SUPPORT
 					, 0
 					, 0
-	#endif /* CANCEL_REASON_SUPPORT */
 					);
 					);
 	} else {
 	} else {
 		/* build the ACK from the reveived INVITE */
 		/* build the ACK from the reveived INVITE */
 		return build_local( trans, branch, ret_len,
 		return build_local( trans, branch, ret_len,
 					ACK, ACK_LEN, &to
 					ACK, ACK_LEN, &to
-	#ifdef CANCEL_REASON_SUPPORT
 					, 0
 					, 0
-	#endif /* CANCEL_REASON_SUPPORT */
 					);
 					);
 	}
 	}
 }
 }
@@ -522,9 +517,7 @@ static int _reply_light( struct cell *trans, char* buf, unsigned int len,
 		cleanup_uac_timers( trans );
 		cleanup_uac_timers( trans );
 		if (is_invite(trans)){
 		if (is_invite(trans)){
 			prepare_to_cancel(trans, &cancel_data.cancel_bitmap, 0);
 			prepare_to_cancel(trans, &cancel_data.cancel_bitmap, 0);
-#ifdef CANCEL_REASON_SUPPORT
 			cancel_data.reason.cause=code;
 			cancel_data.reason.cause=code;
-#endif /* CANCEL_REASON_SUPPORT */
 			cancel_uacs( trans, &cancel_data, F_CANCEL_B_KILL );
 			cancel_uacs( trans, &cancel_data, F_CANCEL_B_KILL );
 		}
 		}
 		start_final_repl_retr(  trans );
 		start_final_repl_retr(  trans );
@@ -1339,9 +1332,7 @@ static enum rps t_should_relay_response( struct cell *Trans , int new_code,
 					 * if the 6xx handling is not disabled */
 					 * if the 6xx handling is not disabled */
 					prepare_to_cancel(Trans, &cancel_data->cancel_bitmap, 0);
 					prepare_to_cancel(Trans, &cancel_data->cancel_bitmap, 0);
 					Trans->flags|=T_6xx;
 					Trans->flags|=T_6xx;
-#ifdef CANCEL_REASON_SUPPORT
 					cancel_data->reason.cause=new_code;
 					cancel_data->reason.cause=new_code;
-#endif /* CANCEL_REASON_SUPPORT */
 				}
 				}
 			}
 			}
 			LM_DBG("store - other branches still active\n");
 			LM_DBG("store - other branches still active\n");
@@ -1506,9 +1497,7 @@ static enum rps t_should_relay_response( struct cell *Trans , int new_code,
 		*should_relay= (new_code==100 && !cfg_get(tm, tm_cfg, relay_100)) ? -1 : branch;
 		*should_relay= (new_code==100 && !cfg_get(tm, tm_cfg, relay_100)) ? -1 : branch;
 		if (new_code>=200 ) {
 		if (new_code>=200 ) {
 			prepare_to_cancel( Trans, &cancel_data->cancel_bitmap, 0);
 			prepare_to_cancel( Trans, &cancel_data->cancel_bitmap, 0);
-#ifdef CANCEL_REASON_SUPPORT
 			cancel_data->reason.cause=new_code;
 			cancel_data->reason.cause=new_code;
-#endif /* CANCEL_REASON_SUPPORT */
 			LM_DBG("rps completed - uas status: %d\n", Trans->uas.status);
 			LM_DBG("rps completed - uas status: %d\n", Trans->uas.status);
 			return RPS_COMPLETED;
 			return RPS_COMPLETED;
 		} else {
 		} else {
@@ -2335,7 +2324,6 @@ int reply_received( struct sip_msg  *p_msg )
 				 * if BUSY or set just exit, a cancel will be (or was) sent
 				 * if BUSY or set just exit, a cancel will be (or was) sent
 				 * shortly on this branch */
 				 * shortly on this branch */
 				LM_DBG("branch CANCEL created\n");
 				LM_DBG("branch CANCEL created\n");
-#ifdef CANCEL_REASON_SUPPORT
 				if (t->uas.cancel_reas) {
 				if (t->uas.cancel_reas) {
 					/* cancel reason was saved, use it */
 					/* cancel reason was saved, use it */
 					cancel_branch(t, branch, t->uas.cancel_reas,
 					cancel_branch(t, branch, t->uas.cancel_reas,
@@ -2350,9 +2338,6 @@ int reply_received( struct sip_msg  *p_msg )
 					cancel_branch(t, branch, &cancel_data.reason,
 					cancel_branch(t, branch, &cancel_data.reason,
 														F_CANCEL_B_FORCE_C);
 														F_CANCEL_B_FORCE_C);
 				}
 				}
-#else /* CANCEL_REASON_SUPPORT */
-				cancel_branch(t, branch, F_CANCEL_B_FORCE_C);
-#endif /* CANCEL_REASON_SUPPORT */
 			}
 			}
 			goto done; /* nothing to do */
 			goto done; /* nothing to do */
 		}
 		}

+ 0 - 16
src/modules/tm/t_reply.h

@@ -23,7 +23,6 @@
 #ifndef _T_REPLY_H
 #ifndef _T_REPLY_H
 #define _T_REPLY_H
 #define _T_REPLY_H
 
 
-#include "defs.h"
 #include "../../core/rpc.h"
 #include "../../core/rpc.h"
 #include "../../core/tags.h"
 #include "../../core/tags.h"
 
 
@@ -63,8 +62,6 @@ int unmatched_totag(struct cell *t, struct sip_msg *ack);
 /* branch bitmap type */
 /* branch bitmap type */
 typedef unsigned int branch_bm_t;
 typedef unsigned int branch_bm_t;
 
 
-#ifdef CANCEL_REASON_SUPPORT
-
 /* reason building blocks (see rfc3326) */
 /* reason building blocks (see rfc3326) */
 #define REASON_PREFIX "Reason: SIP;cause="
 #define REASON_PREFIX "Reason: SIP;cause="
 #define REASON_PREFIX_LEN (sizeof(REASON_PREFIX)-1)
 #define REASON_PREFIX_LEN (sizeof(REASON_PREFIX)-1)
@@ -106,19 +103,6 @@ struct cancel_info {
 		init_cancel_reason(&(ci)->reason); \
 		init_cancel_reason(&(ci)->reason); \
 	}while (0);
 	}while (0);
 
 
-#else /* ! CANCEL_REASON_SUPPORT */
-
-struct cancel_info {
-	branch_bm_t cancel_bitmap; /**< cancel branch bitmap */
-};
-
-#define init_cancel_info(ci) \
-	do {\
-		(ci)->cancel_bitmap=0; \
-	}while (0);
-
-#endif /* CANCEL_REASON_SUPPORT */
-
 
 
 /* reply export types */
 /* reply export types */
 typedef int (*treply_f)(struct sip_msg * , unsigned int , char * );
 typedef int (*treply_f)(struct sip_msg * , unsigned int , char * );

+ 0 - 2
src/modules/tm/t_stats.c

@@ -20,8 +20,6 @@
  */
  */
 
 
 
 
-#include "defs.h"
-
 
 
 #include <stdio.h>
 #include <stdio.h>
 #include "t_stats.h"
 #include "t_stats.h"

+ 0 - 2
src/modules/tm/t_stats.h

@@ -25,8 +25,6 @@
 /* if defined even more stats are produced */
 /* if defined even more stats are produced */
 #define TM_MORE_STATS
 #define TM_MORE_STATS
 
 
-#include "defs.h"
-
 #include "../../core/rpc.h"
 #include "../../core/rpc.h"
 #include "../../core/pt.h"
 #include "../../core/pt.h"
 
 

+ 0 - 7
src/modules/tm/timer.c

@@ -88,8 +88,6 @@
  */
  */
 
 
 
 
-#include "defs.h"
-
 
 
 #include "config.h"
 #include "config.h"
 #include "h_table.h"
 #include "h_table.h"
@@ -297,13 +295,8 @@ static void fake_reply(struct cell *t, int branch, int code)
 				relay_reply(t, FAKED_REPLY, branch, code, &cancel_data, 0);
 				relay_reply(t, FAKED_REPLY, branch, code, &cancel_data, 0);
 	}
 	}
 /* now when out-of-lock do the cancel I/O */
 /* now when out-of-lock do the cancel I/O */
-#ifdef CANCEL_REASON_SUPPORT
 	if(do_cancel_branch)
 	if(do_cancel_branch)
 		cancel_branch(t, branch, &cancel_data.reason, 0);
 		cancel_branch(t, branch, &cancel_data.reason, 0);
-#else /* CANCEL_REASON_SUPPORT */
-	if(do_cancel_branch)
-		cancel_branch(t, branch, 0);
-#endif /* CANCEL_REASON_SUPPORT */
 	/* it's cleaned up on error; if no error occurred and transaction
 	/* it's cleaned up on error; if no error occurred and transaction
 	   completed regularly, I have to clean-up myself
 	   completed regularly, I have to clean-up myself
 	*/
 	*/

+ 0 - 2
src/modules/tm/timer.h

@@ -91,8 +91,6 @@
 #ifndef _TM_TIMER_H
 #ifndef _TM_TIMER_H
 #define _TM_TIMER_H
 #define _TM_TIMER_H
 
 
-#include "defs.h"
-
 #include "../../core/compiler_opt.h"
 #include "../../core/compiler_opt.h"
 #include "lock.h"
 #include "lock.h"
 
 

+ 0 - 10
src/modules/tm/tm.c

@@ -46,8 +46,6 @@
  */
  */
 
 
 
 
-#include "defs.h"
-
 
 
 #include <stdio.h>
 #include <stdio.h>
 #include <string.h>
 #include <string.h>
@@ -189,10 +187,8 @@ static int w_t_reset_max_lifetime(struct sip_msg* msg, char* foo, char* bar);
 static int w_t_set_auto_inv_100(struct sip_msg* msg, char* on_off, char* foo);
 static int w_t_set_auto_inv_100(struct sip_msg* msg, char* on_off, char* foo);
 static int w_t_set_disable_6xx(struct sip_msg* msg, char* on_off, char* foo);
 static int w_t_set_disable_6xx(struct sip_msg* msg, char* on_off, char* foo);
 static int w_t_set_disable_failover(struct sip_msg* msg, char* on_off, char* f);
 static int w_t_set_disable_failover(struct sip_msg* msg, char* on_off, char* f);
-#ifdef CANCEL_REASON_SUPPORT
 static int w_t_set_no_e2e_cancel_reason(struct sip_msg* msg, char* on_off,
 static int w_t_set_no_e2e_cancel_reason(struct sip_msg* msg, char* on_off,
 		char* f);
 		char* f);
-#endif /* CANCEL_REASON_SUPPORT */
 static int w_t_set_disable_internal_reply(struct sip_msg* msg, char* on_off,
 static int w_t_set_disable_internal_reply(struct sip_msg* msg, char* on_off,
 		char* f);
 		char* f);
 static int w_t_branch_timeout(struct sip_msg* msg, char*, char*);
 static int w_t_branch_timeout(struct sip_msg* msg, char*, char*);
@@ -363,7 +359,6 @@ static cmd_export_t cmds[]={
 		REQUEST_ROUTE|TM_ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE },
 		REQUEST_ROUTE|TM_ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE },
 	{"t_set_disable_failover", w_t_set_disable_failover, 1, fixup_var_int_1, 0,
 	{"t_set_disable_failover", w_t_set_disable_failover, 1, fixup_var_int_1, 0,
 		REQUEST_ROUTE|TM_ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE },
 		REQUEST_ROUTE|TM_ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE },
-#ifdef CANCEL_REASON_SUPPORT
 	{"t_set_no_e2e_cancel_reason", w_t_set_no_e2e_cancel_reason, 1,
 	{"t_set_no_e2e_cancel_reason", w_t_set_no_e2e_cancel_reason, 1,
 		fixup_var_int_1, 0,
 		fixup_var_int_1, 0,
 		REQUEST_ROUTE|TM_ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE },
 		REQUEST_ROUTE|TM_ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE },
@@ -371,7 +366,6 @@ static cmd_export_t cmds[]={
 	{"t_disable_e2e_cancel_reason", w_t_set_no_e2e_cancel_reason, 1,
 	{"t_disable_e2e_cancel_reason", w_t_set_no_e2e_cancel_reason, 1,
 		fixup_var_int_1, 0,
 		fixup_var_int_1, 0,
 		REQUEST_ROUTE|TM_ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE },
 		REQUEST_ROUTE|TM_ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE },
-#endif /* CANCEL_REASON_SUPPORT */
 	{"t_set_disable_internal_reply", w_t_set_disable_internal_reply, 1,
 	{"t_set_disable_internal_reply", w_t_set_disable_internal_reply, 1,
 		fixup_var_int_1, 0,
 		fixup_var_int_1, 0,
 		REQUEST_ROUTE|TM_ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE },
 		REQUEST_ROUTE|TM_ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE },
@@ -470,10 +464,8 @@ static param_export_t params[]={
 	{"remap_503_500",       PARAM_INT, &tm_remap_503_500                     },
 	{"remap_503_500",       PARAM_INT, &tm_remap_503_500                     },
 	{"failure_exec_mode",   PARAM_INT, &tm_failure_exec_mode                 },
 	{"failure_exec_mode",   PARAM_INT, &tm_failure_exec_mode                 },
 	{"dns_reuse_rcv_socket",PARAM_INT, &tm_dns_reuse_rcv_socket              },
 	{"dns_reuse_rcv_socket",PARAM_INT, &tm_dns_reuse_rcv_socket              },
-#ifdef CANCEL_REASON_SUPPORT
 	{"local_cancel_reason", PARAM_INT, &default_tm_cfg.local_cancel_reason   },
 	{"local_cancel_reason", PARAM_INT, &default_tm_cfg.local_cancel_reason   },
 	{"e2e_cancel_reason",   PARAM_INT, &default_tm_cfg.e2e_cancel_reason     },
 	{"e2e_cancel_reason",   PARAM_INT, &default_tm_cfg.e2e_cancel_reason     },
-#endif /* CANCEL_REASON_SUPPORT */
 	{"xavp_contact",        PARAM_STR, &ulattrs_xavp_name                    },
 	{"xavp_contact",        PARAM_STR, &ulattrs_xavp_name                    },
 	{"event_callback",      PARAM_STR, &tm_event_callback                    },
 	{"event_callback",      PARAM_STR, &tm_event_callback                    },
 	{"relay_100",           PARAM_INT, &default_tm_cfg.relay_100             },
 	{"relay_100",           PARAM_INT, &default_tm_cfg.relay_100             },
@@ -2093,12 +2085,10 @@ T_SET_FLAG_GEN_FUNC(t_set_disable_failover, T_DISABLE_FAILOVER)
 W_T_SET_FLAG_GEN_FUNC(t_set_disable_failover, T_DISABLE_FAILOVER)
 W_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 */
 /* 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)
 T_SET_FLAG_GEN_FUNC(t_set_no_e2e_cancel_reason, T_NO_E2E_CANCEL_REASON)
 
 
 W_T_SET_FLAG_GEN_FUNC(t_set_no_e2e_cancel_reason, T_NO_E2E_CANCEL_REASON)
 W_T_SET_FLAG_GEN_FUNC(t_set_no_e2e_cancel_reason, T_NO_E2E_CANCEL_REASON)
-#endif /* CANCEL_REASON_SUPPORT */
 
 
 
 
 /* disable internal negative reply for the current transaction */
 /* disable internal negative reply for the current transaction */

+ 0 - 2
src/modules/tm/tm_load.c

@@ -19,8 +19,6 @@
  *
  *
  */
  */
 
 
-#include "defs.h"
-
 
 
 #include "tm_load.h"
 #include "tm_load.h"
 #include "uac.h"
 #include "uac.h"

+ 0 - 2
src/modules/tm/tm_load.h

@@ -24,8 +24,6 @@
 #ifndef _TM_BIND_H
 #ifndef _TM_BIND_H
 #define _TM_BIND_H
 #define _TM_BIND_H
 
 
-#include "defs.h"
-
 
 
 #include "../../core/sr_module.h"
 #include "../../core/sr_module.h"
 #include "t_hooks.h"
 #include "t_hooks.h"