Browse code

bug_fix: request lookup skips UAC transaction

Jiri Kuthan authored on 21/08/2003 19:33:58
Showing 1 changed files
... ...
@@ -70,6 +70,8 @@
70 70
  * 2003-04-07  new transactions inherit on_negative and on_relpy from script
71 71
  *             variables on instatntiation (jiri)
72 72
  * 2003-04-30  t_newtran clean up (jiri)
73
+ * 2003-08-21  request lookups fixed to skip UAC transactions, 
74
+ *             thanks Ed (jiri)
73 75
  */
74 76
 
75 77
 
... ...
@@ -290,8 +292,8 @@ static int matching_3261( struct sip_msg *p_msg, struct cell **trans,
290 292
 		p_cell; p_cell = p_cell->next_cell ) 
291 293
 	{
292 294
 		t_msg=p_cell->uas.request;
293
-		if (skip_method & t_msg->REQ_METHOD)
294
-			continue;
295
+		if (!t_msg) continue;  /* don't try matching UAC transactions */
296
+		if (skip_method & t_msg->REQ_METHOD) continue;
295 297
 
296 298
 		/* dialog matching needs to be applied for ACK/200s */
297 299
 		if (is_ack && p_cell->uas.status<300) {
... ...
@@ -405,6 +407,8 @@ int t_lookup_request( struct sip_msg* p_msg , int leave_new_locked )
405 407
 	{
406 408
 		t_msg = p_cell->uas.request;
407 409
 
410
+		if (!t_msg) continue; /* skip UAC transactions */
411
+
408 412
 		if (!isACK) {	
409 413
 			/* compare lengths first */ 
410 414
 			if (!EQ_LEN(callid)) continue;
... ...
@@ -553,8 +557,10 @@ struct cell* t_lookupOriginalT(  struct sip_msg* p_msg )
553 557
 	{
554 558
 		t_msg = p_cell->uas.request;
555 559
 
560
+		if (!t_msg) continue; /* skip UAC transactions */
561
+
556 562
 		/* we don't cancel CANCELs ;-) */
557
-		if (p_cell->uas.request->REQ_METHOD==METHOD_CANCEL)
563
+		if (t_msg->REQ_METHOD==METHOD_CANCEL)
558 564
 			continue;
559 565
 
560 566
 		/* check lengths now */