mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-24 14:56:58 +00:00
make sure sockets are blocking when they should be blocking.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2157,6 +2157,9 @@ static void *accept_thread(void *ignore)
|
||||
/* For safety, make sure socket is non-blocking */
|
||||
flags = fcntl(as, F_GETFL);
|
||||
fcntl(as, F_SETFL, flags | O_NONBLOCK);
|
||||
} else {
|
||||
flags = fcntl(as, F_GETFL);
|
||||
fcntl(as, F_SETFL, flags & ~O_NONBLOCK);
|
||||
}
|
||||
ast_mutex_init(&s->__lock);
|
||||
s->fd = as;
|
||||
|
Reference in New Issue
Block a user