diff --git a/debian/patches/series b/debian/patches/series index 6dbe1292a..449fad4b6 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -16,6 +16,7 @@ upstream/debug/modules-lcr-use-pv_cache_get.patch upstream/debug/0001-core-added-function-to-get-the-pv-cache-table.patch upstream/debug/0001-core-define-PVT_XAVP-as-type-for-xavp-pseudo-variabl.patch upstream/debug/0002-pv-xavp-name-is-marked-as-PVT_XAVP-type.patch +upstream/debug/0001-modules-debugger-trace-msg-out.patch upstream/debug/modules-debugger-add-dbg_pv_dump-config-function.patch no_lib64_on_64_bits.patch no_INSTALL_file.patch diff --git a/debian/patches/upstream/debug/0001-modules-debugger-trace-msg-out.patch b/debian/patches/upstream/debug/0001-modules-debugger-trace-msg-out.patch new file mode 100644 index 000000000..30fc7484f --- /dev/null +++ b/debian/patches/upstream/debug/0001-modules-debugger-trace-msg-out.patch @@ -0,0 +1,78 @@ +From 691e007e535e384e3dc27f98c81cf247be14ba15 Mon Sep 17 00:00:00 2001 +From: Victor Seva +Date: Tue, 25 Jun 2013 14:09:06 +0200 +Subject: [PATCH] modules/debugger: trace msg out + +--- + modules/debugger/debugger_api.c | 16 ++++++++++++++++ + modules/debugger/debugger_api.h | 2 ++ + modules/debugger/debugger_mod.c | 3 +++ + 3 files changed, 21 insertions(+) + +--- a/modules/debugger/debugger_api.c ++++ b/modules/debugger/debugger_api.c +@@ -173,6 +173,8 @@ + */ + int _dbg_step_loops = 200; + ++int _dbg_outtrace = 0; ++ + /** + * + */ +@@ -415,6 +417,20 @@ + return 0; + } + ++int dbg_cfg_dump(void *data) ++{ ++ str *buf = (str *) data; ++ if(buf==NULL) return 0; ++ LM_DBG("msg out:{%.*s}\n", buf->len, buf->s); ++ return 0; ++} ++ ++void dbg_enable_outtrace(void) ++{ ++ if(_dbg_outtrace==1) ++ sr_event_register_cb(SREV_NET_DATA_OUT, dbg_cfg_dump); ++} ++ + /** + * + */ +--- a/modules/debugger/debugger_api.h ++++ b/modules/debugger/debugger_api.h +@@ -37,5 +37,6 @@ + int dbg_set_mod_debug_level(char *mname, int mnlen, int *mlevel); + void dbg_enable_mod_levels(void); + ++void dbg_enable_outtrace(void); + #endif + +--- a/modules/debugger/debugger_mod.c ++++ b/modules/debugger/debugger_mod.c +@@ -54,6 +54,7 @@ + extern char *_dbg_cfgtrace_prefix; + extern int _dbg_step_usleep; + extern int _dbg_step_loops; ++extern int _dbg_outtrace; + + static char * _dbg_cfgtrace_facility_str = 0; + +@@ -74,6 +75,7 @@ + {"log_prefix", STR_PARAM, &_dbg_cfgtrace_prefix}, + {"step_usleep", INT_PARAM, &_dbg_step_usleep}, + {"step_loops", INT_PARAM, &_dbg_step_loops}, ++ {"trace_out_msg", INT_PARAM, &_dbg_outtrace}, + {"mod_hash_size", INT_PARAM, &_dbg_mod_hash_size}, + {"mod_level_mode", INT_PARAM, &_dbg_mod_level}, + {"mod_level", STR_PARAM|USE_FUNC_PARAM, (void*)dbg_mod_level_param}, +@@ -137,6 +139,7 @@ + LM_DBG("rank is (%d)\n", rank); + if (rank==PROC_INIT) { + dbg_enable_mod_levels(); ++ dbg_enable_outtrace(); + return dbg_init_pid_list(); + } + return dbg_init_mypid(); diff --git a/debian/patches/upstream/debug/modules-debugger-add-dbg_pv_dump-config-function.patch b/debian/patches/upstream/debug/modules-debugger-add-dbg_pv_dump-config-function.patch index 64f1a336a..633fca0bf 100644 --- a/debian/patches/upstream/debug/modules-debugger-add-dbg_pv_dump-config-function.patch +++ b/debian/patches/upstream/debug/modules-debugger-add-dbg_pv_dump-config-function.patch @@ -194,7 +194,7 @@ It dumps the content of pv_cache on json format. #include "debugger_act.h" #include "debugger_api.h" -@@ -1078,3 +1081,378 @@ +@@ -1094,3 +1097,378 @@ return; set_module_debug_level_cb(dbg_get_mod_debug_level); } @@ -576,10 +576,11 @@ It dumps the content of pv_cache on json format. \ No newline at end of file --- a/modules/debugger/debugger_api.h +++ b/modules/debugger/debugger_api.h -@@ -37,5 +37,12 @@ - int dbg_set_mod_debug_level(char *mname, int mnlen, int *mlevel); +@@ -38,5 +38,13 @@ void dbg_enable_mod_levels(void); + void dbg_enable_outtrace(void); ++ +#define DBG_DP_NULL 1 +#define DBG_DP_AVP 2 +#define DBG_DP_SCRIPTVAR 4 @@ -601,7 +602,7 @@ It dumps the content of pv_cache on json format. /* parameters */ extern int _dbg_cfgtrace; extern int _dbg_breakpoint; -@@ -63,6 +66,12 @@ +@@ -64,6 +67,12 @@ static cmd_export_t cmds[]={ {"dbg_breakpoint", (cmd_function)w_dbg_breakpoint, 1, fixup_dbg_breakpoint, 0, ANY_ROUTE}, @@ -614,7 +615,7 @@ It dumps the content of pv_cache on json format. {0, 0, 0, 0, 0, 0} }; -@@ -157,6 +166,64 @@ +@@ -160,6 +169,64 @@ return 1; }