diff options
author | Liong Sauw Ming <ming@teluu.com> | 2015-12-11 04:59:56 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2015-12-11 04:59:56 +0000 |
commit | 7c3bbef6996038e4351626b8bf2d6a415518e6e3 (patch) | |
tree | 4dac4475da095fe1e6bc92e7b10bfde6818d8085 /pjlib/include/pj/ssl_sock.h | |
parent | 632d835979a5f40b61631ecb2bb10f4e50d5838a (diff) |
Fixed #1901: crash when async_cnt is set to a value greater than one for SIP TLS transport
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5214 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/include/pj/ssl_sock.h')
-rw-r--r-- | pjlib/include/pj/ssl_sock.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/pjlib/include/pj/ssl_sock.h b/pjlib/include/pj/ssl_sock.h index c24e7bd9..f31a0452 100644 --- a/pjlib/include/pj/ssl_sock.h +++ b/pjlib/include/pj/ssl_sock.h @@ -864,6 +864,18 @@ PJ_DECL(void) pj_ssl_sock_param_default(pj_ssl_sock_param *param); /** + * Duplicate pj_ssl_sock_param. + * + * @param pool Pool to allocate memory. + * @param dst Destination parameter. + * @param src Source parameter. + */ +PJ_DECL(void) pj_ssl_sock_param_copy(pj_pool_t *pool, + pj_ssl_sock_param *dst, + const pj_ssl_sock_param *src); + + +/** * Create secure socket instance. * * @param pool The pool for allocating secure socket instance. @@ -1115,6 +1127,30 @@ PJ_DECL(pj_status_t) pj_ssl_sock_start_accept(pj_ssl_sock_t *ssock, /** + * Same as #pj_ssl_sock_start_accept(), but application can provide + * a secure socket parameter, which will be used to create a new secure + * socket reported in \a on_accept_complete() callback when there is + * an incoming connection. + * + * @param ssock The secure socket. + * @param pool Pool used to allocate some internal data for the + * operation. + * @param localaddr Local address to bind on. + * @param addr_len Length of buffer containing local address. + * @param newsock_param Secure socket parameter for new accepted sockets. + * + * @return PJ_SUCCESS if the operation has been successful, + * or the appropriate error code on failure. + */ +PJ_DECL(pj_status_t) +pj_ssl_sock_start_accept2(pj_ssl_sock_t *ssock, + pj_pool_t *pool, + const pj_sockaddr_t *local_addr, + int addr_len, + const pj_ssl_sock_param *newsock_param); + + +/** * Starts asynchronous socket connect() operation and SSL/TLS handshaking * for this socket. Once the connection is done (either successfully or not), * the \a on_connect_complete() callback will be called. |