Browse code

- when replicating, no reply is allowed to propagate upstream -> error replies are no more generated when fwd failes for replicated requests

Bogdan-Andrei Iancu authored on 12/05/2004 09:40:05
Showing 1 changed files
... ...
@@ -290,17 +290,21 @@ int t_relay_to( struct sip_msg  *p_msg , struct proxy_l *proxy, int proto,
290 290
 	/* now go ahead and forward ... */
291 291
 	ret=t_forward_nonack(t, p_msg, proxy, proto);
292 292
 	if (ret<=0) {
293
-		DBG( "SER:ERROR: t_forward \n");
294
-		reply_ret=kill_transaction( t );
295
-		if (reply_ret>0) {
296
-			/* we have taken care of all -- do nothing in
297
-		  	script */
298
-			DBG("ERROR: generation of a stateful reply "
299
-				"on error succeeded\n");
300
-			ret=0;
301
-		}  else {
302
-			DBG("ERROR: generation of a stateful reply "
303
-				"on error failed\n");
293
+		DBG( "ERROR:tm:t_relay_to: t_forward_nonack return error \n");
294
+		/* no reply concerning the replicated request must
295
+		 * propagate upstream */
296
+		if (!replicate) {
297
+			reply_ret=kill_transaction( t );
298
+			if (reply_ret>0) {
299
+				/* we have taken care of all -- do nothing in
300
+				script */
301
+				DBG("ERROR: generation of a stateful reply "
302
+					"on error succeeded\n");
303
+				ret=0;
304
+			}  else {
305
+				DBG("ERROR: generation of a stateful reply "
306
+					"on error failed\n");
307
+			}
304 308
 		}
305 309
 	} else {
306 310
 		DBG( "SER: new transaction fwd'ed\n");