- fixed verbose message in chat-loop.

This commit is contained in:
MelwareDE 2007-05-01 18:10:39 +00:00
parent b222057cf2
commit 5228834b7d
1 changed files with 9 additions and 8 deletions

View File

@ -199,17 +199,18 @@ static struct capichat_s *add_chat_member(char *roomname, struct capi_pvt *i)
/* /*
* loop during chat * loop during chat
*/ */
static void chat_handle_events(struct ast_channel *chan, struct capi_pvt *i) static void chat_handle_events(struct ast_channel *c, struct capi_pvt *i)
{ {
struct ast_frame *f; struct ast_frame *f;
int ms; int ms;
int exception; int exception;
int ready_fd; int ready_fd;
int waitfds[1]; int waitfd;
int nfds = 0; int nfds = 0;
struct ast_channel *rchan; struct ast_channel *rchan;
struct ast_channel *chan = c;
waitfds[0] = i->readerfd; waitfd = i->readerfd;
if (i->channeltype == CAPI_CHANNELTYPE_NULL) { if (i->channeltype == CAPI_CHANNELTYPE_NULL) {
nfds = 1; nfds = 1;
ast_indicate(chan, -1); ast_indicate(chan, -1);
@ -231,7 +232,7 @@ static void chat_handle_events(struct ast_channel *chan, struct capi_pvt *i)
errno = 0; errno = 0;
exception = 0; exception = 0;
rchan = ast_waitfor_nandfds(&chan, 1, waitfds, nfds, &exception, &ready_fd, &ms); rchan = ast_waitfor_nandfds(&chan, 1, &waitfd, nfds, &exception, &ready_fd, &ms);
if (rchan) { if (rchan) {
f = ast_read(chan); f = ast_read(chan);
@ -245,16 +246,16 @@ static void chat_handle_events(struct ast_channel *chan, struct capi_pvt *i)
i->vname); i->vname);
ast_frfree(f); ast_frfree(f);
break; break;
} } else if (f->frametype == AST_FRAME_VOICE) {
if (f->frametype == AST_FRAME_VOICE) {
cc_verbose(5, 1, VERBOSE_PREFIX_3 "%s: chat: voice frame.\n", cc_verbose(5, 1, VERBOSE_PREFIX_3 "%s: chat: voice frame.\n",
i->vname); i->vname);
if (i->channeltype == CAPI_CHANNELTYPE_NULL) { if (i->channeltype == CAPI_CHANNELTYPE_NULL) {
capi_write_frame(i, f); capi_write_frame(i, f);
} }
} } else {
cc_verbose(5, 1, VERBOSE_PREFIX_3 "%s: chat: unhandled frame %d/%d.\n", cc_verbose(5, 1, VERBOSE_PREFIX_3 "%s: chat: unhandled frame %d/%d.\n",
i->vname, f->frametype, f->subclass); 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) {