Module: kamailio Branch: master Commit: e361e5ec2883775d14d92d46659d062b31c45f33 URL: https://github.com/kamailio/kamailio/commit/e361e5ec2883775d14d92d46659d062b...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2018-08-24T11:02:32+02:00
tm: added fcount field for free operations debugging
---
Modified: src/modules/tm/h_table.c Modified: src/modules/tm/h_table.h
---
Diff: https://github.com/kamailio/kamailio/commit/e361e5ec2883775d14d92d46659d062b... Patch: https://github.com/kamailio/kamailio/commit/e361e5ec2883775d14d92d46659d062b...
---
diff --git a/src/modules/tm/h_table.c b/src/modules/tm/h_table.c index ee79b91fd3..998bdfad8e 100644 --- a/src/modules/tm/h_table.c +++ b/src/modules/tm/h_table.c @@ -143,7 +143,10 @@ void free_cell_helper( unlink_timers(dead_cell); remove_from_hash_table_unsafe(dead_cell); } - release_cell_lock(dead_cell); + release_cell_lock(dead_cell); /* does nothing */ + + dead_cell->fcount++; + if(unlikely(has_tran_tmcbs(dead_cell, TMCB_DESTROY))) run_trans_callbacks(TMCB_DESTROY, dead_cell, 0, 0, 0);
diff --git a/src/modules/tm/h_table.h b/src/modules/tm/h_table.h index 7d61ae3673..a60fb9c754 100644 --- a/src/modules/tm/h_table.h +++ b/src/modules/tm/h_table.h @@ -366,6 +366,9 @@ typedef struct cell /* number of forks */ short nr_of_outgoings;
+ /* free operations counter - debug */ + int fcount; + #ifdef TM_DEL_UNREF /* every time the transaction/cell is referenced from somewhere this * ref_count should be increased (via REF()) and every time the reference