Browse Source

- export param types adjusted to PARAM_STR/STRING & PARAM_INT
- removed corresponding obsolete strlen(str_param) in init

Tomas Mandys 19 years ago
parent
commit
0973fee79a
5 changed files with 81 additions and 78 deletions
  1. 1 1
      Makefile
  2. 2 1
      Makefile.modules
  3. 25 25
      cfg.lex
  4. 49 49
      modules/tm/tm.c
  5. 4 2
      usr_avp.h

+ 1 - 1
Makefile

@@ -99,7 +99,7 @@ include Makefile.defs
 NAME=$(MAIN_NAME)
 
 #export relevant variables to the sub-makes
-export DEFS PROFILE CC LD MKDEP MKTAGS CFLAGS LDFLAGS MOD_CFLAGS MOD_LDFLAGS 
+export DEFS PROFILE CC LD MKDEP MKTAGS CFLAGS LDFLAGS INCLUDES MOD_CFLAGS MOD_LDFLAGS 
 export LIBS
 export LEX YACC YACC_FLAGS
 export PREFIX LOCALBASE

+ 2 - 1
Makefile.modules

@@ -17,7 +17,8 @@ override modules=
 override static_modules=
 override static_modules_path=
 
-INCLUDES += -I$(COREPATH)
+# should be set in Makefile of apart module
+# INCLUDES += -I$(COREPATH)
 
 ifeq ($(MAKELEVEL), 0)
 # make called directly in the module dir!

+ 25 - 25
cfg.lex

@@ -22,8 +22,8 @@
  * 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 
+ * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  * History:
@@ -35,7 +35,7 @@
  *  2003-04-05  s/reply_route/failure_route, onreply_route introduced (jiri)
  *  2003-04-12  added force_rport, chdir and wdir (andrei)
  *  2003-04-22  strip_tail added (jiri)
- *  2003-07-03  tls* (disable, certificate, private_key, ca_list, verify, 
+ *  2003-07-03  tls* (disable, certificate, private_key, ca_list, verify,
  *               require_certificate added (andrei)
  *  2003-07-06  more tls config. vars added: tls_method, tls_port_no (andrei)
  *  2003-10-02  added {,set_}advertised_{address,port} (andrei)
@@ -89,7 +89,7 @@
 		int left;
 	};
 
-	
+
 	static int comment_nest=0;
 	static int state=0;
 	static struct str_buf s_buf;
@@ -351,7 +351,7 @@ EAT_ABLE	[\ \t\b\r]
 <INITIAL>{PREFIX}	{ count(); yylval.strval=yytext; return PREFIX; }
 <INITIAL>{STRIP}	{ count(); yylval.strval=yytext; return STRIP; }
 <INITIAL>{STRIP_TAIL}	{ count(); yylval.strval=yytext; return STRIP_TAIL; }
-<INITIAL>{APPEND_BRANCH}	{ count(); yylval.strval=yytext; 
+<INITIAL>{APPEND_BRANCH}	{ count(); yylval.strval=yytext;
 								return APPEND_BRANCH; }
 <INITIAL>{FORCE_RPORT}	{ count(); yylval.strval=yytext; return FORCE_RPORT; }
 <INITIAL>{FORCE_TCP_ALIAS}	{ count(); yylval.strval=yytext;
@@ -441,11 +441,11 @@ EAT_ABLE	[\ \t\b\r]
 <INITIAL>{TLS_VERIFY}	{ count(); yylval.strval=yytext; return TLS_VERIFY; }
 <INITIAL>{TLS_REQUIRE_CERTIFICATE}	{ count(); yylval.strval=yytext;
 										return TLS_REQUIRE_CERTIFICATE; }
-<INITIAL>{TLS_CERTIFICATE}	{ count(); yylval.strval=yytext; 
+<INITIAL>{TLS_CERTIFICATE}	{ count(); yylval.strval=yytext;
 										return TLS_CERTIFICATE; }
-<INITIAL>{TLS_PRIVATE_KEY}	{ count(); yylval.strval=yytext; 
+<INITIAL>{TLS_PRIVATE_KEY}	{ count(); yylval.strval=yytext;
 										return TLS_PRIVATE_KEY; }
-<INITIAL>{TLS_CA_LIST}	{ count(); yylval.strval=yytext; 
+<INITIAL>{TLS_CA_LIST}	{ count(); yylval.strval=yytext;
 										return TLS_CA_LIST; }
 <INITIAL>{TLS_HANDSHAKE_TIMEOUT}	{ count(); yylval.strval=yytext;
 										return TLS_HANDSHAKE_TIMEOUT; }
@@ -488,10 +488,10 @@ EAT_ABLE	[\ \t\b\r]
 <INITIAL>{MINUS}	{ count(); return MINUS; }
 
 <INITIAL>{SELECT_MARK}  { count(); state = SELECT_S; BEGIN(SELECT); return SELECT_MARK; }
-<SELECT>{ID}		{ count(); addstr(&s_buf, yytext, yyleng); 
+<SELECT>{ID}		{ count(); addstr(&s_buf, yytext, yyleng);
                           yylval.strval=s_buf.s;
                           memset(&s_buf, 0, sizeof(s_buf));
-                          return ID; 
+                          return ID;
                         }
 <SELECT>{DOT}           { count(); return DOT; }
 <SELECT>{LBRACK}        { count(); return LBRACK; }
@@ -514,12 +514,12 @@ EAT_ABLE	[\ \t\b\r]
 <ATTR>{RBRACK}          { count(); return RBRACK; }
 <ATTR>{STAR}		{ count(); return STAR; }
 <ATTR>{DECNUMBER}	{ count(); yylval.intval=atoi(yytext);return NUMBER; }
-<ATTR>{ID}		{ count(); addstr(&s_buf, yytext, yyleng); 
+<ATTR>{ID}		{ count(); addstr(&s_buf, yytext, yyleng);
                            yylval.strval=s_buf.s;
 			   memset(&s_buf, 0, sizeof(s_buf));
                            state = INITIAL_S;
                            BEGIN(INITIAL);
-			   return ID; 
+			   return ID;
                         }
 
 <INITIAL>{IPV6ADDR}		{ count(); yylval.strval=yytext; return IPV6ADDR; }
@@ -567,14 +567,14 @@ EAT_ABLE	[\ \t\b\r]
 <INITIAL>{TICK} { count(); state=STRING_S; BEGIN(STRING2); }
 
 
-<STRING1>{QUOTES} { count(); state=INITIAL_S; BEGIN(INITIAL); 
+<STRING1>{QUOTES} { count(); state=INITIAL_S; BEGIN(INITIAL);
 						yytext[yyleng-1]=0; yyleng--;
 						addstr(&s_buf, yytext, yyleng);
 						yylval.strval=s_buf.s;
 						memset(&s_buf, 0, sizeof(s_buf));
 						return STRING;
 					}
-<STRING2>{TICK}  { count(); state=INITIAL_S; BEGIN(INITIAL); 
+<STRING2>{TICK}  { count(); state=INITIAL_S; BEGIN(INITIAL);
 						yytext[yyleng-1]=0; yyleng--;
 						addstr(&s_buf, yytext, yyleng);
 						yylval.strval=s_buf.s;
@@ -588,12 +588,12 @@ EAT_ABLE	[\ \t\b\r]
 <STRING1>\\a		{ count(); addchar(&s_buf, '\a'); }
 <STRING1>\\t		{ count(); addchar(&s_buf, '\t'); }
 <STRING1>\\{QUOTES}	{ count(); addchar(&s_buf, '"');  }
-<STRING1>\\\\		{ count(); addchar(&s_buf, '\\'); } 
-<STRING1>\\x{HEX}{1,2}	{ count(); addchar(&s_buf, 
+<STRING1>\\\\		{ count(); addchar(&s_buf, '\\'); }
+<STRING1>\\x{HEX}{1,2}	{ count(); addchar(&s_buf,
 											(char)strtol(yytext+2, 0, 16)); }
  /* don't allow \[0-7]{1}, it will eat the backreferences from
     subst_uri if allowed (although everybody should use '' in subt_uri) */
-<STRING1>\\[0-7]{2,3}	{ count(); addchar(&s_buf, 
+<STRING1>\\[0-7]{2,3}	{ count(); addchar(&s_buf,
 											(char)strtol(yytext+1, 0, 8));  }
 <STRING1>\\{CR}		{ count(); } /* eat escaped CRs */
 <STRING1>.|{EAT_ABLE}|{CR}	{ addchar(&s_buf, *yytext); }
@@ -609,9 +609,9 @@ EAT_ABLE	[\ \t\b\r]
 								}
 <COMMENT>.|{EAT_ABLE}|{CR}				{ count(); };
 
-<INITIAL>{COM_LINE}.*{CR}	{ count(); } 
+<INITIAL>{COM_LINE}.*{CR}	{ count(); }
 
-<INITIAL>{ID}			{ count(); addstr(&s_buf, yytext, yyleng); 
+<INITIAL>{ID}			{ count(); addstr(&s_buf, yytext, yyleng);
 									yylval.strval=s_buf.s;
 									memset(&s_buf, 0, sizeof(s_buf));
 									return ID; }
@@ -619,7 +619,7 @@ EAT_ABLE	[\ \t\b\r]
 
 <<EOF>>							{
 									switch(state){
-										case STRING_S: 
+										case STRING_S:
 											LOG(L_CRIT, "ERROR: cfg. parser: unexpected EOF in"
 														" unclosed string\n");
 											if (s_buf.s){
@@ -639,7 +639,7 @@ EAT_ABLE	[\ \t\b\r]
 									}
 									return 0;
 								}
-			
+
 %%
 
 
@@ -655,7 +655,7 @@ static char* addstr(struct str_buf* dst_b, char* src, int len)
 	char *tmp;
 	unsigned size;
 	unsigned used;
-	
+
 	if (dst_b->left<(len+1)){
 		used=(unsigned)(dst_b->crt-dst_b->s);
 		size=used+len+1;
@@ -664,7 +664,7 @@ static char* addstr(struct str_buf* dst_b, char* src, int len)
 		tmp=pkg_malloc(size);
 		if (tmp==0) goto error;
 		if (dst_b->s){
-			memcpy(tmp, dst_b->s, used); 
+			memcpy(tmp, dst_b->s, used);
 			pkg_free(dst_b->s);
 		}
 		dst_b->s=tmp;
@@ -675,7 +675,7 @@ static char* addstr(struct str_buf* dst_b, char* src, int len)
 	dst_b->crt+=len;
 	*(dst_b->crt)=0;
 	dst_b->left-=len;
-	
+
 	return dst_b->s;
 error:
 	LOG(L_CRIT, "ERROR:lex:addstr: memory allocation error\n");
@@ -687,7 +687,7 @@ error:
 static void count()
 {
 	int i;
-	
+
 	startcolumn=column;
 	for (i=0; i<yyleng;i++){
 		if (yytext[i]=='\n'){

+ 49 - 49
modules/tm/tm.c

@@ -47,8 +47,8 @@
  * 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 
+ * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 /*
@@ -129,7 +129,7 @@ inline static int w_t_retransmit_reply(struct sip_msg* p_msg, char* foo,
 				char* bar );
 inline static int w_t_newtran(struct sip_msg* p_msg, char* foo, char* bar );
 inline static int w_t_relay( struct sip_msg  *p_msg , char *_foo, char *_bar);
-inline static int w_t_relay_to_udp( struct sip_msg  *p_msg , char *proxy, 
+inline static int w_t_relay_to_udp( struct sip_msg  *p_msg , char *proxy,
 				 char *);
 #ifdef USE_TCP
 inline static int w_t_relay_to_tcp( struct sip_msg  *p_msg , char *proxy,
@@ -139,19 +139,19 @@ inline static int w_t_relay_to_tcp( struct sip_msg  *p_msg , char *proxy,
 inline static int w_t_relay_to_tls( struct sip_msg  *p_msg , char *proxy,
 				char *);
 #endif
-inline static int w_t_replicate( struct sip_msg  *p_msg , 
+inline static int w_t_replicate( struct sip_msg  *p_msg ,
 				char *proxy, /* struct proxy_l *proxy expected */
 				char *_foo       /* nothing expected */ );
-inline static int w_t_replicate_udp( struct sip_msg  *p_msg , 
+inline static int w_t_replicate_udp( struct sip_msg  *p_msg ,
 				char *proxy, /* struct proxy_l *proxy expected */
 				char *_foo       /* nothing expected */ );
 #ifdef USE_TCP
-inline static int w_t_replicate_tcp( struct sip_msg  *p_msg , 
+inline static int w_t_replicate_tcp( struct sip_msg  *p_msg ,
 				char *proxy, /* struct proxy_l *proxy expected */
 				char *_foo       /* nothing expected */ );
 #endif
 #ifdef USE_TLS
-inline static int w_t_replicate_tls( struct sip_msg  *p_msg , 
+inline static int w_t_replicate_tls( struct sip_msg  *p_msg ,
 				char *proxy, /* struct proxy_l *proxy expected */
 				char *_foo       /* nothing expected */ );
 #endif
@@ -267,22 +267,22 @@ static cmd_export_t cmds[]={
 
 
 static param_export_t params[]={
-	{"ruri_matching",       INT_PARAM, &ruri_matching                        },
-	{"via1_matching",       INT_PARAM, &via1_matching                        },
-	{"fr_timer",            INT_PARAM, &fr_timeout                           },
-	{"fr_inv_timer",        INT_PARAM, &fr_inv_timeout                       },
-	{"wt_timer",            INT_PARAM, &wait_timeout                         },
-	{"delete_timer",        INT_PARAM, &delete_timeout                       },
-	{"retr_timer1",         INT_PARAM, &rt_t1_timeout                        },
-	{"retr_timer2"  ,       INT_PARAM, &rt_t2_timeout                        },
-	{"noisy_ctimer",        INT_PARAM, &noisy_ctimer                         },
-	{"uac_from",            STR_PARAM, &uac_from                             },
-	{"unix_tx_timeout",     INT_PARAM, &tm_unix_tx_timeout                   },
-	{"restart_fr_on_each_reply", INT_PARAM, &restart_fr_on_each_reply        },
-	{"fr_timer_avp",        STR_PARAM, &fr_timer_param                       },
-	{"fr_inv_timer_avp",    STR_PARAM, &fr_inv_timer_param                   },
-	{"tw_append",           STR_PARAM|USE_FUNC_PARAM, (void*)parse_tw_append },
-        {"pass_provisional_replies", INT_PARAM, &pass_provisional_replies        },
+	{"ruri_matching",       PARAM_INT, &ruri_matching                        },
+	{"via1_matching",       PARAM_INT, &via1_matching                        },
+	{"fr_timer",            PARAM_INT, &fr_timeout                           },
+	{"fr_inv_timer",        PARAM_INT, &fr_inv_timeout                       },
+	{"wt_timer",            PARAM_INT, &wait_timeout                         },
+	{"delete_timer",        PARAM_INT, &delete_timeout                       },
+	{"retr_timer1",         PARAM_INT, &rt_t1_timeout                        },
+	{"retr_timer2"  ,       PARAM_INT, &rt_t2_timeout                        },
+	{"noisy_ctimer",        PARAM_INT, &noisy_ctimer                         },
+	{"uac_from",            PARAM_STRING, &uac_from                          },
+	{"unix_tx_timeout",     PARAM_INT, &tm_unix_tx_timeout                   },
+	{"restart_fr_on_each_reply", PARAM_INT, &restart_fr_on_each_reply        },
+	{"fr_timer_avp",        PARAM_STRING, &fr_timer_param                    },
+	{"fr_inv_timer_avp",    PARAM_STRING, &fr_inv_timer_param                },
+	{"tw_append",           PARAM_STRING|PARAM_USE_FUNC, (void*)parse_tw_append },
+        {"pass_provisional_replies", PARAM_INT, &pass_provisional_replies        },
 	{0,0,0}
 };
 
@@ -298,7 +298,7 @@ struct module_exports exports= {
 	tm_rpc,    /* RPC methods */
 	/* ------------ exported variables ---------- */
 	params,
-	
+
 	mod_init, /* module initialization function */
 	(response_function) reply_received,
 	(destroy_function) tm_shutdown,
@@ -315,7 +315,7 @@ static int fixup_hostport2proxy(void** param, int param_no)
 	int err;
 	struct proxy_l *proxy;
 	str s;
-	
+
 	DBG("TM module: fixup_hostport2proxy(%s, %d)\n", (char*)*param, param_no);
 	if (param_no==1){
 		return 0;
@@ -354,7 +354,7 @@ static int w_t_unref( struct sip_msg *foo, void *bar)
 
 
 static int script_init( struct sip_msg *foo, void *bar)
-{   
+{
 	/* we primarily reset all private memory here to make sure
 	 * private values left over from previous message will
 	 * not be used again */
@@ -376,7 +376,7 @@ static int script_init( struct sip_msg *foo, void *bar)
 
 static int mod_init(void)
 {
-	DBG( "TM - (sizeof cell=%ld, sip_msg=%ld) initializing...\n", 
+	DBG( "TM - (sizeof cell=%ld, sip_msg=%ld) initializing...\n",
 			(long)sizeof(struct cell), (long)sizeof(struct sip_msg));
 	/* checking if we have sufficient bitmap capacity for given
 	   maximum number of  branches */
@@ -410,7 +410,7 @@ static int mod_init(void)
 	 * will be started; however we started already our
 	 * timers, so we know and process_count should not
 	 * change any more
-	 */	
+	 */
 	if (init_tm_stats()<0) {
 		LOG(L_CRIT, "ERROR: mod_init: failed to init stats\n");
 		return -1;
@@ -608,7 +608,7 @@ inline static int w_t_reply(struct sip_msg* msg, char* str, char* str2)
 	 * is called; we are already in a mutex and another mutex in
 	 * the safe version would lead to a deadlock
 	 */
-	if (rmode==MODE_ONFAILURE) { 
+	if (rmode==MODE_ONFAILURE) {
 		DBG("DEBUG: t_reply_unsafe called from w_t_reply\n");
 		return t_reply_unsafe(t, msg, (unsigned int)(long) str, str2);
 	} else if (rmode==MODE_REQUEST) {
@@ -625,7 +625,7 @@ inline static int w_t_release(struct sip_msg* msg, char* str, char* str2)
 	struct cell *t;
 	if (t_check( msg  , 0  )==-1) return -1;
 	t=get_t();
-	if ( t && t!=T_UNDEFINED ) 
+	if ( t && t!=T_UNDEFINED )
 		return t_release_transaction( t );
 	return 1;
 }
@@ -636,7 +636,7 @@ inline static int w_t_retransmit_reply( struct sip_msg* p_msg, char* foo, char*
 	struct cell *t;
 
 
-	if (t_check( p_msg  , 0 )==-1) 
+	if (t_check( p_msg  , 0 )==-1)
 		return 1;
 	t=get_t();
 	if (t) {
@@ -645,12 +645,12 @@ inline static int w_t_retransmit_reply( struct sip_msg* p_msg, char* foo, char*
 			return -1;
 		}
 		return t_retransmit_reply( t );
-	} else 
+	} else
 		return -1;
 }
 
 
-inline static int w_t_newtran( struct sip_msg* p_msg, char* foo, char* bar ) 
+inline static int w_t_newtran( struct sip_msg* p_msg, char* foo, char* bar )
 {
 	/* t_newtran returns 0 on error (negative value means
 	   'transaction exists' */
@@ -679,12 +679,12 @@ inline static int w_t_on_reply( struct sip_msg* msg, char *go_to, char *foo )
 
 
 
-inline static int _w_t_relay_to( struct sip_msg  *p_msg , 
+inline static int _w_t_relay_to( struct sip_msg  *p_msg ,
 	struct proxy_l *proxy )
 {
 	struct cell *t;
 
-	if (rmode==MODE_ONFAILURE) { 
+	if (rmode==MODE_ONFAILURE) {
 		t=get_t();
 		if (!t || t==T_UNDEFINED) {
 			LOG(L_CRIT, "BUG: w_t_relay_to: undefined T\n");
@@ -696,7 +696,7 @@ inline static int _w_t_relay_to( struct sip_msg  *p_msg ,
 		}
 		return 1;
 	}
-	if (rmode==MODE_REQUEST) 
+	if (rmode==MODE_REQUEST)
 		return t_relay_to( p_msg, proxy, PROTO_NONE,
 			0 /* no replication */ );
 	LOG(L_CRIT, "ERROR: w_t_relay_to: unsupported mode: %d\n", rmode);
@@ -704,7 +704,7 @@ inline static int _w_t_relay_to( struct sip_msg  *p_msg ,
 }
 
 
-inline static int w_t_relay_to_udp( struct sip_msg  *p_msg , 
+inline static int w_t_relay_to_udp( struct sip_msg  *p_msg ,
 	char *proxy, /* struct proxy_l *proxy expected */
 	char *_foo       /* nothing expected */ )
 {
@@ -714,7 +714,7 @@ inline static int w_t_relay_to_udp( struct sip_msg  *p_msg ,
 
 
 #ifdef USE_TCP
-inline static int w_t_relay_to_tcp( struct sip_msg  *p_msg , 
+inline static int w_t_relay_to_tcp( struct sip_msg  *p_msg ,
 	char *proxy, /* struct proxy_l *proxy expected */
 	char *_foo       /* nothing expected */ )
 {
@@ -725,7 +725,7 @@ inline static int w_t_relay_to_tcp( struct sip_msg  *p_msg ,
 
 
 #ifdef USE_TLS
-inline static int w_t_relay_to_tls( struct sip_msg  *p_msg , 
+inline static int w_t_relay_to_tls( struct sip_msg  *p_msg ,
 	char *proxy, /* struct proxy_l *proxy expected */
 	char *_foo       /* nothing expected */ )
 {
@@ -735,7 +735,7 @@ inline static int w_t_relay_to_tls( struct sip_msg  *p_msg ,
 #endif
 
 
-inline static int w_t_replicate( struct sip_msg  *p_msg , 
+inline static int w_t_replicate( struct sip_msg  *p_msg ,
 	char *proxy, /* struct proxy_l *proxy expected */
 	char *_foo       /* nothing expected */ )
 {
@@ -743,7 +743,7 @@ inline static int w_t_replicate( struct sip_msg  *p_msg ,
 }
 
 
-inline static int w_t_replicate_udp( struct sip_msg  *p_msg , 
+inline static int w_t_replicate_udp( struct sip_msg  *p_msg ,
 	char *proxy, /* struct proxy_l *proxy expected */
 	char *_foo       /* nothing expected */ )
 {
@@ -752,7 +752,7 @@ inline static int w_t_replicate_udp( struct sip_msg  *p_msg ,
 
 
 #ifdef USE_TCP
-inline static int w_t_replicate_tcp( struct sip_msg  *p_msg , 
+inline static int w_t_replicate_tcp( struct sip_msg  *p_msg ,
 	char *proxy, /* struct proxy_l *proxy expected */
 	char *_foo       /* nothing expected */ )
 {
@@ -762,7 +762,7 @@ inline static int w_t_replicate_tcp( struct sip_msg  *p_msg ,
 
 
 #ifdef USE_TLS
-inline static int w_t_replicate_tls( struct sip_msg  *p_msg , 
+inline static int w_t_replicate_tls( struct sip_msg  *p_msg ,
 	char *proxy, /* struct proxy_l *proxy expected */
 	char *_foo       /* nothing expected */ )
 {
@@ -771,25 +771,25 @@ inline static int w_t_replicate_tls( struct sip_msg  *p_msg ,
 #endif
 
 
-inline static int w_t_relay( struct sip_msg  *p_msg , 
+inline static int w_t_relay( struct sip_msg  *p_msg ,
 						char *_foo, char *_bar)
 {
 	struct cell *t;
 
-	if (rmode==MODE_ONFAILURE) { 
+	if (rmode==MODE_ONFAILURE) {
 		t=get_t();
 		if (!t || t==T_UNDEFINED) {
 			LOG(L_CRIT, "BUG: w_t_relay: undefined T\n");
 			return -1;
-		} 
+		}
 		if (t_forward_nonack(t, p_msg, ( struct proxy_l *) 0, PROTO_NONE)<=0) {
 			LOG(L_ERR, "ERROR: w_t_relay (failure mode): forwarding failed\n");
 			return -1;
 		}
 		return 1;
 	}
-	if (rmode==MODE_REQUEST) 
-		return t_relay_to( p_msg, 
+	if (rmode==MODE_REQUEST)
+		return t_relay_to( p_msg,
 		(struct proxy_l *) 0 /* no proxy */, PROTO_NONE,
 		0 /* no replication */ );
 	LOG(L_CRIT, "ERROR: w_t_relay_to: unsupported mode: %d\n", rmode);
@@ -800,7 +800,7 @@ inline static int w_t_relay( struct sip_msg  *p_msg ,
 /* set fr_inv_timeout & or fr_timeout; 0 means: use the default value */
 static int t_set_fr_all(struct sip_msg* msg, char* fr_inv, char* fr)
 {
-	
+
 	return t_set_fr(msg, (unsigned int)(long)fr_inv, (unsigned int)(long)fr);
 }
 

+ 4 - 2
usr_avp.h

@@ -20,8 +20,8 @@
  * 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 
+ * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  * History:
@@ -147,6 +147,8 @@ typedef struct avp_spec {
 #define AVP_INDEX_BACKWARD	(1<<11)
 #define AVP_INDEX_ALL		(AVP_INDEX_FORWARD | AVP_INDEX_BACKWARD)
 
+#define AVP_FLAG_DIALOG         (1<<12)
+
 #define GALIAS_CHAR_MARKER  '$'
 
 /* Initialize memory structures */