]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Merged revisions 374906 via svnmerge from
authorAutomerge script <automerge@asterisk.org>
Fri, 12 Oct 2012 16:23:56 +0000 (16:23 +0000)
committerAutomerge script <automerge@asterisk.org>
Fri, 12 Oct 2012 16:23:56 +0000 (16:23 +0000)
commit6f9104870e5d0a565d4c81dbd5acce018f020b05
tree26301797bf39d8b77e543bf14ea87aaff9745ea1
parent9a99f40468d4cf642619a28ff25c66ed430f599c
Merged revisions 374906 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r374906 | mmichelson | 2012-10-12 11:11:30 -0500 (Fri, 12 Oct 2012) | 28 lines

  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
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@374923 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/chan_sip.c
include/asterisk/tcptls.h
main/tcptls.c