From ab4a1270e9c99ab7a21a957759de2a885100afb1 Mon Sep 17 00:00:00 2001 From: Super User Date: Thu, 24 Jul 2008 18:24:20 +0200 Subject: [PATCH 1/1] fixed trace bug added ast_setstate after pbx_start() modified: chan_lcr.c modified: mISDN.cpp modified: trace.h --- chan_lcr.c | 2 ++ mISDN.cpp | 2 +- trace.h | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/chan_lcr.c b/chan_lcr.c index 2790cf4..7eabe0e 100644 --- a/chan_lcr.c +++ b/chan_lcr.c @@ -690,6 +690,7 @@ static void lcr_start_pbx(struct chan_call *call, struct ast_channel *ast, int c /* change state */ call->state = CHAN_LCR_STATE_IN_PROCEEDING; + ast_setstate(ast, AST_STATE_OFFHOOK); goto start; } @@ -704,6 +705,7 @@ static void lcr_start_pbx(struct chan_call *call, struct ast_channel *ast, int c /* change state */ call->state = CHAN_LCR_STATE_IN_DIALING; + ast_setstate(ast, AST_STATE_OFFHOOK); /* if match, start pbx */ if (ast_exists_extension(ast, ast->context, ast->exten, 1, call->oad)) { diff --git a/mISDN.cpp b/mISDN.cpp index e8a71cc..df550ae 100644 --- a/mISDN.cpp +++ b/mISDN.cpp @@ -2001,9 +2001,9 @@ int mISDN_handler(void) break; case MT_L2RELEASE: - l1l2l3_trace_header(mISDNport, NULL, L2_RELEASE_IND, DIRECTION_IN); if (!mISDNport->l2establish) { + l1l2l3_trace_header(mISDNport, NULL, L2_RELEASE_IND, DIRECTION_IN); add_trace("tei", NULL, "%d", l3m->pid); end_trace(); } diff --git a/trace.h b/trace.h index c0fcab0..4c82fa4 100644 --- a/trace.h +++ b/trace.h @@ -133,9 +133,9 @@ struct trace { //#define CATEGORY_BC 0x04 check lcradmin help -#define start_trace(port, interface, caller, dialing, direction, category, serial, name) _start_trace(__FUNCTION__, __LINE__, port, interface, caller, dialing, direction, category, serial, name) -#define add_trace(name, sub, fmt, arg...) _add_trace(__FUNCTION__, __LINE__, name, sub, fmt, ## arg) -#define end_trace() _end_trace(__FUNCTION__, __LINE__) +#define start_trace(port, interface, caller, dialing, direction, category, serial, name) _start_trace(__FILE__, __LINE__, port, interface, caller, dialing, direction, category, serial, name) +#define add_trace(name, sub, fmt, arg...) _add_trace(__FILE__, __LINE__, name, sub, fmt, ## arg) +#define end_trace() _end_trace(__FILE__, __LINE__) void _start_trace(const char *__file, int line, int port, struct interface *interface, char *caller, char *dialing, int direction, int category, int serial, char *name); void _add_trace(const char *__file, int line, char *name, char *sub, const char *fmt, ...); void _end_trace(const char *__file, int line); -- 2.13.6