[Asterisk-Dev] Patch for hang in ast_read/capi_read

Philip Warner pjw at rhyme.com.au
Thu Apr 21 06:56:51 MST 2005


At 10:12 PM 21/04/2005, Philip Warner wrote:
>I don't know enough about the internals of this to understand what is going on.

It *looks* like the call to 'poll' times out, but not at the exact millisecond
expected (or system times are slightly out in comparison to timer used by 
poll).

The attached patch checks for a 0 return from poll which according to the docs
means a timeout. If zero is returned, it explicitly sets *ms to 0.

The problem has now gone away, along with several annoying deadlock messages.

This looks safe to me, but I'd appreciate someone who knows asterisk looking at it!


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 03 5330 3172          |                 ___________ |
Http://www.rhyme.com.au          |                /           \|
                                 |    --________--
PGP key available upon request,  |  /
and from pgp.mit.edu:11371       |/ 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asterisk-poll-timeout.patch
Type: application/octet-stream
Size: 413 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20050421/03b13fd2/asterisk-poll-timeout.obj


More information about the asterisk-dev mailing list