Skip to content

Commit 5b7b5f7

Browse files
committed
Fix calculation of timer set on 32b
A bogus bitwise operation broke the calculation of the timer set on 32bits arch. Reported by @mshary (Muhammad Shahzad Shafi) Closes OpenSIPS#732.
1 parent bce5306 commit 5b7b5f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/tm/h_table.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ struct cell* build_cell( struct sip_msg* p_msg, int full_uas)
271271
/* get timer set id based on the transaction pointer, but
272272
* devide by 64 to avoid issues because pointer are 64 bits
273273
* aligned */
274-
set = ( ((long)new_cell)>>tm_timer_shift ) % tm_table->timer_sets;
274+
set = ( ((unsigned long)new_cell)>>tm_timer_shift ) % tm_table->timer_sets;
275275

276276
/* UAS */
277277
#ifdef EXTRA_DEBUG

0 commit comments

Comments
 (0)