From 2ea4a890faabc5471bc32599f53a195884eb8260 Mon Sep 17 00:00:00 2001 From: bbryant Date: Tue, 17 Jun 2008 21:57:15 +0000 Subject: Merged revisions 123546 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r123546 | bbryant | 2008-06-17 16:46:57 -0500 (Tue, 17 Jun 2008) | 5 lines Updates all usages of ast_tcptls_session_instance to be managed by reference counts so that they only get destroyed when all threads are done using them, and memory does not get free'd causing strange issues with SIP. This code was originally written by russellb in the team/group/issue_11972/ branch. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@123547 f38db490-d61c-443f-a65b-d21fe96a405b --- include/asterisk/tcptls.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/asterisk/tcptls.h b/include/asterisk/tcptls.h index 004a883bc..a345200e9 100644 --- a/include/asterisk/tcptls.h +++ b/include/asterisk/tcptls.h @@ -50,6 +50,7 @@ #define _ASTERISK_SERVER_H #include "asterisk/utils.h" +#include "asterisk/astobj2.h" #if defined(HAVE_OPENSSL) && (defined(HAVE_FUNOPEN) || defined(HAVE_FOPENCOOKIE)) #define DO_SSL /* comment in/out if you want to support ssl */ @@ -127,6 +128,7 @@ struct ast_tcptls_session_instance { int client; struct sockaddr_in requestor; struct server_args *parent; + ast_mutex_t lock; }; /*! \brief @@ -166,11 +168,4 @@ void *ast_make_file_from_fd(void *data); HOOK_T ast_tcptls_server_read(struct ast_tcptls_session_instance *ser, void *buf, size_t count); HOOK_T ast_tcptls_server_write(struct ast_tcptls_session_instance *ser, void *buf, size_t count); -/*! - * \brief Destroy a server instance - * - * \return NULL for convenience - */ -struct ast_tcptls_session_instance *ast_tcptls_session_instance_destroy(struct ast_tcptls_session_instance *i); - #endif /* _ASTERISK_SERVER_H */ -- cgit v1.2.3