Browse code

*** empty log message ***

Bogdan-Andrei Iancu authored on 08/03/2002 08:25:41
Showing 4 changed files
... ...
@@ -84,7 +84,7 @@ DEFS+= -DNAME='"$(NAME)"' -DVERSION='"$(RELEASE)"' -DARCH='"$(ARCH)"' \
84 84
 	 -DF_MALLOC  -DUSE_SYNONIM\
85 85
 	 -DSHM_MEM  -DSHM_MMAP \
86 86
 	 -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 \
87
-	 -DWAIT -DNEW_HNAME\ #-DNOISY_REPLIES -DBOGDAN_TRIFLE \
87
+	 -DWAIT -DNEW_HNAME -DNOISY_REPLIES -DBOGDAN_TRIFLE \
88 88
 	 -DSILENT_FR \
89 89
 	 -DNO_DEBUG \
90 90
 	 #-DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=0 \
... ...
@@ -143,7 +143,8 @@ extern struct s_table*  hash_table;
143 143
 		DBG_REF("ref", (_T_cell));	})
144 144
 #endif
145 145
 
146
-enum addifnew_status { AIN_ERROR, AIN_RETR, AIN_NEW, AIN_NEWACK, AIN_OLDACK } ;
146
+enum addifnew_status { AIN_ERROR, AIN_RETR, AIN_NEW, AIN_NEWACK,
147
+	AIN_OLDACK, AIN_RTRACK } ;
147 148
 
148 149
 
149 150
 int   tm_startup();
... ...
@@ -501,7 +501,15 @@ enum addifnew_status t_addifnew( struct sip_msg* p_msg )
501 501
 			return ret;
502 502
 		} else {
503 503
 			/* tramsaction found, it's a retransmission  or ACK */
504
-			return p_msg->REQ_METHOD==METHOD_ACK ? AIN_OLDACK : AIN_RETR;
504
+			if (p_msg->REQ_METHOD!=METHOD_ACK)
505
+				return AIN_RETR;
506
+			else {
507
+				if (T->inbound_request_isACKed)
508
+					return AIN_RTRACK;
509
+				else
510
+					return AIN_OLDACK;
511
+				}
512
+			//return p_msg->REQ_METHOD==METHOD_ACK ? AIN_OLDACK : AIN_RETR;
505 513
 		}
506 514
 	} else {
507 515
 		if (T)
... ...
@@ -359,6 +359,10 @@ static int t_relay_to( struct sip_msg  *p_msg , char *str_ip , char *str_port)
359 359
 				DBG( "SER: WARNING: bad ACK forward\n");
360 360
 			ret = 1;
361 361
 			break;
362
+		case AIN_RTRACK:
363
+			DBG("SER: ACK retransmission detected: drop ACK!\n");
364
+			ret = 1;
365
+			break;
362 366
 		default:
363 367
 			LOG(L_CRIT, "ERROR: unexpected addifnew return value: %d\n", ret);
364 368
 			abort();