Files
asterisk/main
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-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-09-28 18:27:02 +00:00
2012-03-24 02:42:42 +00:00
2012-09-21 17:14:59 +00:00
2012-09-22 20:43:30 +00:00
2012-10-02 23:23:30 +00:00
2012-09-22 20:43:30 +00:00
2012-06-15 16:20:16 +00:00
2012-07-06 15:31:52 +00:00
2012-10-02 01:47:16 +00:00
2012-10-02 01:47:16 +00:00
2012-06-15 16:20:16 +00:00
2012-10-01 17:05:37 +00:00
2012-08-21 19:04:32 +00:00
2012-03-22 19:51:16 +00:00
2012-10-02 01:47:16 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-03-22 19:51:16 +00:00
2012-06-15 16:20:16 +00:00
2012-10-02 01:47:16 +00:00
2012-08-30 14:23:28 +00:00
2012-06-15 16:20:16 +00:00
2012-10-02 01:47:16 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-10-01 23:39:45 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-10-11 22:39:02 +00:00
2012-04-28 01:33:49 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-09-25 23:10:22 +00:00
2012-06-15 16:20:16 +00:00
2012-09-21 17:14:59 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-09-21 17:14:59 +00:00
2012-06-15 16:20:16 +00:00
2012-09-21 17:14:59 +00:00
2012-06-15 16:20:16 +00:00
2012-07-30 23:26:51 +00:00
2012-06-15 16:20:16 +00:00
2012-10-02 01:47:16 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-10-02 01:47:16 +00:00