r346525 | jrose | 2011-11-30 15:10:38 -0600 (Wed, 30 Nov 2011) | 18 lines
authorJonathan Rose <jrose@digium.com>
Wed, 30 Nov 2011 22:03:02 +0000 (22:03 +0000)
committerJonathan Rose <jrose@digium.com>
Wed, 30 Nov 2011 22:03:02 +0000 (22:03 +0000)
commit9ef171ffe0b39ab6fbf1325c4b7d5a3e5441db75
treeb942a9764c47eae68e23a7ba5b83e463c858e27e
parentfb4c483eb7f87c2b19441ea326fc47380b8a37e7
r346525 | jrose | 2011-11-30 15:10:38 -0600 (Wed, 30 Nov 2011) | 18 lines

Cleaning up chan_sip/tcptls file descriptor closing.

This patch attempts to eliminate various possible instances of undefined behavior caused
by invoking close/fclose in situations where fclose may have already been issued on a
tcptls_session_instance and/or closing file descriptors that don't have a valid index
for fd (-1). Thanks for more than a little help from wdoekes.

(closes issue ASTERISK-18700)
Reported by: Erik Wallin

(issue ASTERISK-18345)
Reported by: Stephane Cazelas

(issue ASTERISK-18342)
Reported by: Stephane Chazelas

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

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

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

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