Files
asterisk/include/asterisk
Mark Michelson c7b23cbb0a Do not use a FILE handle when doing SIP TCP reads.
This is used to solve an issue where a poll on a file
descriptor does not necessarily correspond to the readiness
of a FILE handle to be read.

This change makes it so that for TCP connections, we do a
recv() on the file descriptor instead.

Because TCP does not guarantee that an entire message or even
just one single message will arrive during a read, a loop has
been introduced to ensure that we only attempt to handle a
single message at a time. The tcptls_session_instance structure
has also had an overflow buffer added to it so that if more
than one TCP message arrives in one go, there is a place to
throw the excess.

Huge thanks goes out to Walter Doekes for doing extensive review
on this change and finding edge cases where code could fail.

(closes issue ASTERISK-20212)
reported by Phil Ciccone

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

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

Merged revisions 374906 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 374914 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-12 16:31:01 +00:00
..
2012-09-22 20:43:30 +00:00
2012-09-21 17:14:59 +00:00
2012-06-25 15:55:25 +00:00
2010-06-02 18:10:15 +00:00
2012-09-21 17:14:59 +00:00
2009-04-29 18:53:01 +00:00
2010-06-08 14:38:18 +00:00
2012-10-02 01:47:16 +00:00
2012-08-30 14:23:28 +00:00
2012-08-30 14:23:28 +00:00
2012-08-30 14:23:28 +00:00
2011-12-16 21:10:19 +00:00
2012-08-30 14:23:28 +00:00
2012-08-30 14:23:28 +00:00
2012-08-30 14:23:28 +00:00
2012-08-30 14:23:28 +00:00
2012-10-01 23:39:45 +00:00
2012-08-30 14:23:28 +00:00
2012-08-30 14:23:28 +00:00
2012-09-22 20:43:30 +00:00
2012-07-20 15:48:55 +00:00
2012-08-30 14:23:28 +00:00
2012-08-30 14:23:28 +00:00
2010-06-08 14:38:18 +00:00
2012-09-21 17:14:59 +00:00
2012-09-21 17:14:59 +00:00
2012-08-21 19:04:32 +00:00
2012-08-30 14:23:28 +00:00
2012-08-30 14:23:28 +00:00
2012-10-11 22:39:02 +00:00
2009-06-15 16:07:23 +00:00
2012-08-30 14:23:28 +00:00
2012-09-22 20:43:30 +00:00
2012-08-30 14:23:28 +00:00
2012-09-21 17:14:59 +00:00
2012-02-24 15:10:35 +00:00
2010-08-30 08:25:50 +00:00
2011-10-11 19:06:29 +00:00
2010-06-08 14:38:18 +00:00
2012-08-30 14:23:28 +00:00
2010-06-08 14:38:18 +00:00
2012-08-30 14:23:28 +00:00
2010-06-08 14:38:18 +00:00
2012-06-25 17:59:34 +00:00
2012-09-22 20:43:30 +00:00