aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorbbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-17 21:46:57 +0000
committerbbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-17 21:46:57 +0000
commit720a492e88bee291ee8afa7559b6c0a30e205661 (patch)
tree433e912686703e932450fab80be4457b5636176a /include
parent7b14a79ae755f65fdc3608a48cb0c7ffbdce5638 (diff)
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/trunk@123546 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/tcptls.h9
1 files changed, 2 insertions, 7 deletions
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 */