Module: sip-router Branch: master Commit: 40ddcf88df9ef71bba7c182b7a1d76b559645628 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=40ddcf88...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Mon Apr 16 14:03:14 2012 +0200
debugger: safe wrapper around cfg name
- some actions can be executed from inside the code, with no cfg file name attached to it -- that makes debugger crash on solaris while printing executed action details - reported by Nathaniel
---
modules/debugger/debugger_api.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/debugger/debugger_api.c b/modules/debugger/debugger_api.c index 7fbfd0d..bbf31a0 100644 --- a/modules/debugger/debugger_api.c +++ b/modules/debugger/debugger_api.c @@ -252,7 +252,7 @@ int dbg_cfg_trace(void *data) LOG_(_dbg_cfgtrace_facility, _dbg_cfgtrace_level, _dbg_cfgtrace_prefix, " c=[%s] l=%d a=%d n=%.*s\n", - a->cfile, a->cline, a->type, an->len, an->s + ZSW(a->cfile), a->cline, a->type, an->len, ZSW(an->s) ); } } @@ -267,7 +267,7 @@ int dbg_cfg_trace(void *data) LOG(_dbg_cfgtrace_level, "breakpoint hit: p=[%u] c=[%s] l=%d a=%d n=%.*s\n", _dbg_pid_list[process_no].pid, - a->cfile, a->cline, a->type, an->len, an->s + ZSW(a->cfile), a->cline, a->type, an->len, ZSW(an->s) ); _dbg_pid_list[process_no].in.cmd = DBG_CMD_NOP; _dbg_pid_list[process_no].state = DBG_STATE_WAIT; @@ -295,7 +295,7 @@ int dbg_cfg_trace(void *data) olen = snprintf(_dbg_pid_list[process_no].out.buf, DBG_CMD_SIZE, "exec [%s:%d] a=%d n=%.*s", - a->cfile, a->cline, a->type, an->len, an->s); + ZSW(a->cfile), a->cline, a->type, an->len, ZSW(an->s)); if(olen<0) { _dbg_pid_list[process_no].out.cmd = DBG_CMD_ERR;