Browse Source

tmx(k): remove unnecessary reply locking

- reply locking is not needed around prepare_to_cancel() (former
  which_cancel()).
Andrei Pelinescu-Onciul 16 năm trước cách đây
mục cha
commit
51aeea7d51
1 tập tin đã thay đổi với 0 bổ sung4 xóa
  1. 0 4
      modules_k/tmx/tmx_mod.c

+ 0 - 4
modules_k/tmx/tmx_mod.c

@@ -231,23 +231,19 @@ static int t_cancel_branches(struct sip_msg* msg, char *k, char *s2)
 	n = (int)k;
 	switch(n) {
 		case 1:
-			LOCK_REPLIES(t);
 			/* prepare cancel for every branch except idx */
 			_tmx_tmb.prepare_to_cancel(t, &cb, 1<<idx);
-			UNLOCK_REPLIES(t);
 		case 2:
 			if(msg->first_line.u.reply.statuscode>=200)
 				break;
 			cb = 1<<idx;
 		break;
 		default:
-			LOCK_REPLIES(t);
 			if (msg->first_line.u.reply.statuscode>=200)
 				/* prepare cancel for every branch except idx */
 				_tmx_tmb.prepare_to_cancel(t, &cb, 1<<idx);
 			else
 				_tmx_tmb.prepare_to_cancel(t, &cb, 0);
-			UNLOCK_REPLIES(t);
 	}
 	LM_DBG("canceling %d/%d\n", n, (int)cb);
 	if(cb==0)