]> git.ipfire.org Git - thirdparty/asterisk.git/commit
IAX2, prevent network thread starting before all helper threads are ready
authorAlec L Davis <sivad.a@paradise.net.nz>
Fri, 12 Apr 2013 08:16:15 +0000 (08:16 +0000)
committerAlec L Davis <sivad.a@paradise.net.nz>
Fri, 12 Apr 2013 08:16:15 +0000 (08:16 +0000)
commit4a06abfee4577fc4bda9f4862392e85cdea97d5f
treef5da769aa18be072468f7a29d2b66bebb3440c88
parentd8216bd9ee74e9cba5b53a5433bd8e058d8a7d94
IAX2, prevent network thread starting before all helper threads are ready

On startup, it's possible for a frame to arrive before the processing threads were ready.

In iax2_process_thread() the first pass through falls into ast_cond_wait, should a frame arrive
before we are at ast_cond_wait, the signal will be ignored.
The result iax2_process_thread stays at ast_cond_wait forever, with deferred frames being queued.

Fix: When creating initial idle iax2_process_threads, wait for init_cond to be signalled
after each thread is started.

(issue ASTERISK-18827)
Reported by: alecdavis
Tested by: alecdavis
alecdavis (license 585)

Review https://reviewboard.asterisk.org/r/2427/
........

Merged revisions 385402 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@385403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/chan_iax2.c