Fix worker thread resource leak in SIP TCP/TLS.

The SIP TCP/TLS worker threads were created joinable but noone could join
them if they died on their own.

* Fix the SIP TCP/TLS worker threads to not be created joinable.

* _sip_tcp_helper_thread() only needs one parameter since the pvt
parameter is only passed in as NULL and never used.

(closes issue ASTERISK-19203)
Reported by: Steve Davies

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Richard Mudgett
2012-02-24 18:33:04 +00:00
parent 8e1f841dde
commit ebe2c33b72
3 changed files with 30 additions and 21 deletions

View File

@@ -1393,6 +1393,7 @@ struct tcptls_packet {
};
/*! \brief Definition of a thread that handles a socket */
struct sip_threadinfo {
/*! TRUE if the thread needs to kill itself. (The module is being unloaded.) */
int stop;
int alert_pipe[2]; /*! Used to alert tcptls thread when packet is ready to be written */
pthread_t threadid;