Skip to content
Snippets Groups Projects
Commit e132f22a authored by Jenkins2's avatar Jenkins2 Committed by Gerrit Code Review
Browse files

Merge "chan_console: don't read and write at the same time"

parents 7484ed25 5b8fea93
No related branches found
No related tags found
No related merge requests found
......@@ -278,7 +278,9 @@ static void *stream_monitor(void *data)
for (;;) {
pthread_testcancel();
console_pvt_lock(pvt);
res = Pa_ReadStream(pvt->stream, buf, sizeof(buf) / sizeof(int16_t));
console_pvt_unlock(pvt);
pthread_testcancel();
if (!pvt->owner) {
......@@ -611,7 +613,9 @@ static int console_write(struct ast_channel *chan, struct ast_frame *f)
{
struct console_pvt *pvt = ast_channel_tech_pvt(chan);
console_pvt_lock(pvt);
Pa_WriteStream(pvt->stream, f->data.ptr, f->samples);
console_pvt_unlock(pvt);
return 0;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment