Module: sip-router Branch: master Commit: 181f81b2458ee04241b36c65ac1d95f38003250d URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=181f81b2...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Thu Jul 8 12:32:45 2010 +0200
tm: export function to get access to tm table
- to fix missing symbol in tmx for mode=debug, reported by Santiago Gimeno
---
modules/tm/h_table.c | 3 +++ modules/tm/h_table.h | 3 +++ modules/tm/tm_load.c | 1 + modules/tm/tm_load.h | 1 + 4 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/modules/tm/h_table.c b/modules/tm/h_table.c index 1e61ea6..b07dd31 100644 --- a/modules/tm/h_table.c +++ b/modules/tm/h_table.c @@ -76,6 +76,9 @@ static enum kill_reason kr; lives */ struct s_table* _tm_table;
+struct s_table* tm_get_table(void) { + return _tm_table; +}
void reset_kr() { kr=0; diff --git a/modules/tm/h_table.h b/modules/tm/h_table.h index 1c1cd2d..8e43ae3 100644 --- a/modules/tm/h_table.h +++ b/modules/tm/h_table.h @@ -475,6 +475,9 @@ enum kill_reason get_kr();
#define get_tm_table() (_tm_table)
+typedef struct s_table* (*tm_get_table_f)(void); +struct s_table* tm_get_table(void); + struct s_table* init_hash_table(); void free_hash_table( ); void free_cell( struct cell* dead_cell ); diff --git a/modules/tm/tm_load.c b/modules/tm/tm_load.c index 0b19ad2..a0fad54 100644 --- a/modules/tm/tm_load.c +++ b/modules/tm/tm_load.c @@ -136,6 +136,7 @@ int load_tm( struct tm_binds *tmb) tmb->unref_cell = unref_cell; tmb->prepare_to_cancel = prepare_to_cancel; tmb->get_stats = tm_get_stats; + tmb->get_table = tm_get_table;
#ifdef WITH_TM_CTX tmb->tm_ctx_get = tm_ctx_get; diff --git a/modules/tm/tm_load.h b/modules/tm/tm_load.h index 2d4b6f6..11cf4e1 100644 --- a/modules/tm/tm_load.h +++ b/modules/tm/tm_load.h @@ -121,6 +121,7 @@ struct tm_binds { unref_cell_f unref_cell; prepare_to_cancel_f prepare_to_cancel; tm_get_stats_f get_stats; + tm_get_table_f get_table; #ifdef WITH_TM_CTX tm_ctx_get_f tm_ctx_get; #else