Browse code

bug_fix: local cancel retransmission timer release beautification if () {return} else statement changed to if () {... return}; statement

Jiri Kuthan authored on 28/08/2002 09:06:34
Showing 2 changed files
... ...
@@ -620,10 +620,10 @@ int t_newtran( struct sip_msg* p_msg )
620 620
 	lret = t_lookup_request( p_msg, 1 /* leave locked if not found */ );
621 621
 	/* on error, pass the error in the stack ... */
622 622
 	if (lret==0) return E_BAD_TUPEL;
623
+	/* transaction not found, it's a new request;
624
+	   establish a new transaction (unless it is an ACK) */
623 625
 	if (lret<0) {
624 626
 		new_cell=0;
625
-		/* transaction not found, it's a new request;
626
-		   establish a new transaction (unless it is an ACK) */
627 627
 		if ( p_msg->REQ_METHOD!=METHOD_ACK ) {
628 628
 			/* add new transaction */
629 629
 			new_cell = build_cell( p_msg ) ;
... ...
@@ -684,16 +684,16 @@ int t_newtran( struct sip_msg* p_msg )
684 684
 		}
685 685
 
686 686
 		return ret;
687
+	} 
688
+
689
+	/* transaction found, it's a retransmission  or hbh ACK */
690
+	if (p_msg->REQ_METHOD==METHOD_ACK) {
691
+		t_release_transaction(T);
687 692
 	} else {
688
-		/* transaction found, it's a retransmission  or hbh ACK */
689
-		if (p_msg->REQ_METHOD==METHOD_ACK) {
690
-			t_release_transaction(T);
691
-		} else {
692
-			t_retransmit_reply(T);
693
-		}
694
-		/* things are done -- return from script */
695
-		return 0;
693
+		t_retransmit_reply(T);
696 694
 	}
695
+	/* things are done -- return from script */
696
+	return 0;
697 697
 
698 698
 }
699 699
 
... ...
@@ -41,7 +41,7 @@ static void unlink_timers( struct cell *t )
41 41
 	if (is_in_timer_list2(&t->uas.response.retr_timer)) remove_retr=1; 
42 42
 	else for (i=0; i<t->nr_of_outgoings; i++)
43 43
 		if (is_in_timer_list2(&t->uac[i].request.retr_timer)
44
-			|| is_in_timer_list2(&t->uac[i].local_cancel.fr_timer)) {
44
+			|| is_in_timer_list2(&t->uac[i].local_cancel.retr_timer)) {
45 45
 				remove_retr=1;
46 46
 				break;
47 47
 		}