- a little bit more verbose in chat.
This commit is contained in:
parent
d02004dabc
commit
b222057cf2
|
@ -279,8 +279,7 @@ int capi_wait_for_b3_up(struct capi_pvt *i)
|
|||
int ret = 1;
|
||||
|
||||
cc_mutex_lock(&i->lock);
|
||||
if ((!(i->isdnstate & CAPI_ISDN_STATE_B3_UP)) &&
|
||||
(i->PLCI != 0)) {
|
||||
if (!(i->isdnstate & CAPI_ISDN_STATE_B3_UP)) {
|
||||
i->waitevent = CAPI_WAITEVENT_B3_UP;
|
||||
abstime.tv_sec = time(NULL) + 2;
|
||||
abstime.tv_nsec = 0;
|
||||
|
|
|
@ -236,17 +236,25 @@ static void chat_handle_events(struct ast_channel *chan, struct capi_pvt *i)
|
|||
if (rchan) {
|
||||
f = ast_read(chan);
|
||||
if (!f) {
|
||||
cc_verbose(3, 1, VERBOSE_PREFIX_3 "%s: chat: no frame, hangup.\n",
|
||||
i->vname);
|
||||
break;
|
||||
}
|
||||
if ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP)) {
|
||||
cc_verbose(3, 1, VERBOSE_PREFIX_3 "%s: chat: hangup frame.\n",
|
||||
i->vname);
|
||||
ast_frfree(f);
|
||||
break;
|
||||
}
|
||||
if (f->frametype == AST_FRAME_VOICE) {
|
||||
cc_verbose(5, 1, VERBOSE_PREFIX_3 "%s: chat: voice frame.\n",
|
||||
i->vname);
|
||||
if (i->channeltype == CAPI_CHANNELTYPE_NULL) {
|
||||
capi_write_frame(i, f);
|
||||
}
|
||||
}
|
||||
cc_verbose(5, 1, VERBOSE_PREFIX_3 "%s: chat: unhandled frame %d/%d.\n",
|
||||
i->vname, f->frametype, f->subclass);
|
||||
ast_frfree(f);
|
||||
} else if (ready_fd == i->readerfd) {
|
||||
if (exception) {
|
||||
|
|
Loading…
Reference in New Issue