Ver código fonte

ERROR message transaction already exists moved to w_t_newtran, t_newtran logs only with DEBUG level

Michal Matyska 19 anos atrás
pai
commit
e5ef14a741
3 arquivos alterados com 10 adições e 4 exclusões
  1. 1 2
      modules/tm/t_funcs.c
  2. 2 1
      modules/tm/t_lookup.c
  3. 7 1
      modules/tm/tm.c

+ 1 - 2
modules/tm/t_funcs.c

@@ -205,10 +205,9 @@ int t_relay_to( struct sip_msg  *p_msg , struct proxy_l *proxy, int proto,
 	struct dest_info dst;
 
 	ret=0;
-
+	
 	new_tran = t_newtran( p_msg );
 	
-
 	/* parsing error, memory alloc, whatever ... if via is bad
 	   and we are forced to reply there, return with 0 (->break),
 	   pass error status otherwise

+ 2 - 1
modules/tm/t_lookup.c

@@ -1126,7 +1126,8 @@ int t_newtran( struct sip_msg* p_msg )
 		" T on entrance=%p\n",p_msg->id,global_msg_id,T);
 
 	if ( T && T!=T_UNDEFINED  ) {
-		LOG(L_ERR, "ERROR: t_newtran: "
+		/* ERROR message moved to w_t_newtran */
+		DBG("DEBUG: t_newtran: "
 			"transaction already in process %p\n", T );
 		return E_SCRIPT;
 	}

+ 7 - 1
modules/tm/tm.c

@@ -948,7 +948,13 @@ 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' */
-	return t_newtran( p_msg );
+	int ret;
+	ret = t_newtran( p_msg );
+	if (ret==E_SCRIPT) {
+		LOG(L_ERR, "ERROR: t_newtran: "
+			"transaction already in process %p\n", get_t() );
+	}
+	return ret;
 }