- a little bit more verbose in chat.

This commit is contained in:
MelwareDE 2007-05-01 16:05:09 +00:00
parent d02004dabc
commit b222057cf2
2 changed files with 9 additions and 2 deletions

View File

@ -279,8 +279,7 @@ int capi_wait_for_b3_up(struct capi_pvt *i)
int ret = 1; int ret = 1;
cc_mutex_lock(&i->lock); cc_mutex_lock(&i->lock);
if ((!(i->isdnstate & CAPI_ISDN_STATE_B3_UP)) && if (!(i->isdnstate & CAPI_ISDN_STATE_B3_UP)) {
(i->PLCI != 0)) {
i->waitevent = CAPI_WAITEVENT_B3_UP; i->waitevent = CAPI_WAITEVENT_B3_UP;
abstime.tv_sec = time(NULL) + 2; abstime.tv_sec = time(NULL) + 2;
abstime.tv_nsec = 0; abstime.tv_nsec = 0;

View File

@ -236,17 +236,25 @@ static void chat_handle_events(struct ast_channel *chan, struct capi_pvt *i)
if (rchan) { if (rchan) {
f = ast_read(chan); f = ast_read(chan);
if (!f) { if (!f) {
cc_verbose(3, 1, VERBOSE_PREFIX_3 "%s: chat: no frame, hangup.\n",
i->vname);
break; break;
} }
if ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP)) { 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); ast_frfree(f);
break; break;
} }
if (f->frametype == AST_FRAME_VOICE) { 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) { if (i->channeltype == CAPI_CHANNELTYPE_NULL) {
capi_write_frame(i, f); 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); ast_frfree(f);
} else if (ready_fd == i->readerfd) { } else if (ready_fd == i->readerfd) {
if (exception) { if (exception) {