Переглянути джерело

- use cancel_b_method also when CANCEL-ing due to received 6xx

Andrei Pelinescu-Onciul 17 роки тому
батько
коміт
1e49e88305
2 змінених файлів з 10 додано та 8 видалено
  1. 3 0
      modules/tm/t_cancel.c
  2. 7 8
      modules/tm/t_reply.c

+ 3 - 0
modules/tm/t_cancel.c

@@ -39,6 +39,9 @@
  * 2007-06-04  cancel_branch() can operate in lockless mode (with a lockless
  *              should_cancel()) (andrei)
  * 2008-03-07  cancel_branch() takes a new flag: F_CANCEL_B_FORCE_RETR (andrei)
+ * 2008-03-08  e2e_cancel handles non replied branches in 3 different ways,
+ *              selectable by the tm cancel_b_method parameter: fake reply,
+ *              retransmit request and send cancel on branch (andrei)
  */
 
 #include <stdio.h> /* for FILE* in fifo_uac_cancel */

+ 7 - 8
modules/tm/t_reply.c

@@ -85,6 +85,7 @@
  * 2007-05-28: build_ack() constructs the ACK from the
  *             outgoing INVITE instead of the incomming one.
  *             (it can be disabled with reparse_invite=0) (Miklos)
+ * 2008-03-12  use cancel_b_method on 6xx (andrei)
  *
  */
 
@@ -1845,10 +1846,9 @@ int reply_received( struct sip_msg  *p_msg )
 			 * that the transaction is local */
 			put_on_wait(t);
 		}else if (cancel_bitmap){
-			/* cancel everything, even non-INVITEs (e.g in case of 6xx), wait
-			 * for the cancel replies if a provisional response was received
-			 *  or generate a fake reply if not */
-			cancel_uacs(t, cancel_bitmap, F_CANCEL_B_FAKE_REPLY);
+			/* cancel everything, even non-INVITEs (e.g in case of 6xx), use
+			 * cancel_b_method for canceling unreplied branches */
+			cancel_uacs(t, cancel_bitmap, cfg_get(tm,tm_cfg, cancel_b_flags));
 		}
 	} else {
 		reply_status=relay_reply( t, p_msg, branch, msg_status,
@@ -1868,10 +1868,9 @@ int reply_received( struct sip_msg  *p_msg )
 			 * retransmissions comes before retransmission timer is set.*/
 			/* set_final_timer(t) */
 		}else if (cancel_bitmap){
-			/* cancel everything, even non-INVITEs (e.g in case of 6xx), wait
-			 * for the cancel replies if a provisional response was received
-			 *  or generate a fake reply if not */
-			cancel_uacs(t, cancel_bitmap, F_CANCEL_B_FAKE_REPLY);
+			/* cancel everything, even non-INVITEs (e.g in case of 6xx), use
+			 * cancel_b_method for canceling unreplied branches */
+			cancel_uacs(t, cancel_bitmap, cfg_get(tm,tm_cfg, cancel_b_flags));
 		}
 	}
 	uac->request.flags|=F_RB_REPLIED;