Revert 355700 and 355701

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Paul Belanger
2012-02-17 00:25:13 +00:00
parent 1fd85ee397
commit e31d0dfe40
6 changed files with 21 additions and 6 deletions

View File

@@ -82,6 +82,7 @@ void* ooh323c_call_thread(void* dummy)
struct callthread* mycthread = (struct callthread *)dummy;
struct pollfd pfds[1];
char c;
int res;
do {
@@ -100,7 +101,7 @@ void* ooh323c_call_thread(void* dummy)
pfds[0].events = POLLIN;
ooSocketPoll(pfds, 1, SEC_TO_HOLD_THREAD * 1000);
if (ooPDRead(pfds, 1, mycthread->thePipe[0]))
read(mycthread->thePipe[0], &c, 1);
res = read(mycthread->thePipe[0], &c, 1);
ast_mutex_lock(&callThreadsLock);
ast_mutex_lock(&mycthread->lock);
@@ -128,6 +129,7 @@ void* ooh323c_call_thread(void* dummy)
int ooh323c_start_call_thread(ooCallData *call) {
char c = 'c';
int res;
struct callthread *cur = callThreads;
ast_mutex_lock(&callThreadsLock);
@@ -180,7 +182,7 @@ int ooh323c_start_call_thread(ooCallData *call) {
ast_debug(1,"using existing call thread for call %s\n", call->callToken);
cur->inUse = TRUE;
cur->call = call;
write(cur->thePipe[1], &c, 1);
res = write(cur->thePipe[1], &c, 1);
ast_mutex_unlock(&cur->lock);
}