Browse code

*** empty log message ***

Bogdan-Andrei Iancu authored on 06/03/2002 20:46:50
Showing 4 changed files
... ...
@@ -55,7 +55,7 @@
55 55
 #define PKG_MEM_POOL_SIZE 1024*1024
56 56
 
57 57
 /*used if SH_MEM is defined*/
58
-#define SHM_MEM_SIZE 256
58
+#define SHM_MEM_SIZE 128 
59 59
 
60 60
 #define TIMER_TICK 1
61 61
 #define LONG_SLEEP	3600
... ...
@@ -490,13 +490,21 @@ int t_build_and_send_CANCEL(struct cell *Trans,unsigned int branch)
490 490
 	unsigned int         len, via_len;
491 491
 	struct retrans_buff *srb;
492 492
 
493
+
494
+	if ( !Trans->inbound_response[branch] )
495
+	{
496
+		DBG("DEBUG: t_build_and_send_CANCEL: no response ever received"
497
+			" : dropping local cancel! \n");
498
+		return 1;
499
+	}
500
+
493 501
 	if (Trans->outbound_cancel[branch]!=NO_CANCEL)
494 502
 	{
495 503
 		DBG("DEBUG: t_build_and_send_CANCEL: this branch was already canceled"
496 504
 			" : dropping local cancel! \n");
497 505
 		return 1;
498 506
 	}
499
-	
507
+
500 508
 	cancel_buf = 0;
501 509
 	via = 0;
502 510
 	p_msg = Trans->inbound_request;
... ...
@@ -361,18 +361,20 @@ static inline void reset_retr_timers( struct s_table *h_table,
361 361
 	lock(hash_table->timers[RT_T1_TO_1].mutex);
362 362
 	remove_timer_unsafe( & p_cell->outbound_response.retr_timer );
363 363
 	for( ijk=0 ; ijk<(p_cell)->nr_of_outgoings ; ijk++ )  {
364
-		if ( (rb = p_cell->outbound_request[ijk]) ) {
364
+		if ( (rb = p_cell->outbound_request[ijk]) )
365
+			remove_timer_unsafe( & rb->retr_timer );
366
+		if ( (rb = p_cell->outbound_cancel[ijk]) )
365 367
 			remove_timer_unsafe( & rb->retr_timer );
366
-		}
367 368
 	}
368 369
 	unlock(hash_table->timers[RT_T1_TO_1].mutex);
369 370
 
370 371
 	lock(hash_table->timers[FR_TIMER_LIST].mutex);
371 372
 	remove_timer_unsafe( & p_cell->outbound_response.fr_timer );
372 373
 	for( ijk=0 ; ijk<(p_cell)->nr_of_outgoings ; ijk++ )  {
373
-		if ( (rb = p_cell->outbound_request[ijk]) ) {
374
+		if ( (rb = p_cell->outbound_request[ijk]) )
375
+			remove_timer_unsafe( & rb->fr_timer );
376
+		if ( (rb = p_cell->outbound_cancel[ijk]) )
374 377
 			remove_timer_unsafe( & rb->fr_timer );
375
-		}
376 378
 	}
377 379
 	unlock(hash_table->timers[FR_TIMER_LIST].mutex);
378 380
 	DBG("DEBUG:stop_RETR_and_FR_timers : timers stopped\n");
... ...
@@ -116,9 +116,7 @@ int t_forward_nonack( struct sip_msg* p_msg , unsigned int dest_ip_param ,
116 116
 
117 117
 		DBG("DEBUG: t_forward_nonack: starting timers (retrans and FR) %d\n",get_ticks() );
118 118
 		/*sets and starts the FINAL RESPONSE timer */
119
-#ifdef FR
120 119
 		set_timer( hash_table, &(rb->fr_timer), FR_TIMER_LIST );
121
-#endif
122 120
 
123 121
 		/* sets and starts the RETRANS timer */
124 122
 		rb->retr_list = RT_T1_TO_1;
... ...
@@ -139,9 +137,7 @@ int t_forward_nonack( struct sip_msg* p_msg , unsigned int dest_ip_param ,
139 139
 		/* or if the canceled transaction has a final status -> drop the CANCEL*/
140 140
 		if ( T->T_canceled!=T_NULL && T->T_canceled->status>=200)
141 141
 		{
142
-#ifdef FR
143 142
 			reset_timer( hash_table, &(rb->fr_timer ));
144
-#endif
145 143
 			reset_timer( hash_table, &(rb->retr_timer ));
146 144
 			return 1;
147 145
 		}