fixed trace bug

added ast_setstate after pbx_start()
	modified:   chan_lcr.c
	modified:   mISDN.cpp
	modified:   trace.h
This commit is contained in:
Super User 2008-07-24 18:24:20 +02:00
parent 45fdd28ad2
commit ab4a1270e9
3 changed files with 6 additions and 4 deletions

View File

@ -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)) {

View File

@ -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();
}

View File

@ -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);