From ebe2c33b7239b2881007efa3efd8d8a859f0b653 Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Fri, 24 Feb 2012 18:33:04 +0000 Subject: 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 --- include/asterisk/tcptls.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/asterisk') diff --git a/include/asterisk/tcptls.h b/include/asterisk/tcptls.h index e9b2371fb..c60501397 100644 --- a/include/asterisk/tcptls.h +++ b/include/asterisk/tcptls.h @@ -136,6 +136,7 @@ struct ast_tcptls_session_args { struct ast_tls_config *tls_cfg; /*!< points to the SSL configuration if any */ int accept_fd; int poll_timeout; + /*! Server accept_fn thread ID used for external shutdown requests. */ pthread_t master; void *(*accept_fn)(void *); /*!< the function in charge of doing the accept */ void (*periodic_fn)(void *);/*!< something we may want to run before after select on the accept socket */ @@ -154,6 +155,7 @@ struct ast_tcptls_session_instance { int client; struct ast_sockaddr remote_address; struct ast_tcptls_session_args *parent; + /*! \todo XXX Why do we still use this lock when this struct is allocated as an ao2 object which has its own lock? */ ast_mutex_t lock; }; -- cgit v1.2.3