diff options
author | Benny Prijono <bennylp@teluu.com> | 2012-03-30 07:10:13 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2012-03-30 07:10:13 +0000 |
commit | 6b4964727bffb379aca9601e1cf69051ccbf600c (patch) | |
tree | 1d9739ea8b3b5e0421f1d99b39e798b1514fb644 /pjsip/include/pjsip | |
parent | 85ac546acb235df62169c4ad317da74a62e56a88 (diff) |
Re #1474: Merged all changes from 1.12 - HEAD (from the 1.x branch)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3999 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include/pjsip')
-rw-r--r-- | pjsip/include/pjsip/sip_config.h | 14 | ||||
-rw-r--r-- | pjsip/include/pjsip/sip_endpoint.h | 22 | ||||
-rw-r--r-- | pjsip/include/pjsip/sip_transport.h | 7 | ||||
-rw-r--r-- | pjsip/include/pjsip/sip_transport_tls.h | 28 |
4 files changed, 58 insertions, 13 deletions
diff --git a/pjsip/include/pjsip/sip_config.h b/pjsip/include/pjsip/sip_config.h index 6398e774..3d0c0946 100644 --- a/pjsip/include/pjsip/sip_config.h +++ b/pjsip/include/pjsip/sip_config.h @@ -81,6 +81,13 @@ typedef struct pjsip_cfg_t * Disable rport in request. */ pj_bool_t disable_rport; + + /** + * Disable automatic switching from UDP to TCP if outgoing request + * is greater than 1300 bytes. See PJSIP_DONT_SWITCH_TO_TCP. + */ + pj_bool_t disable_tcp_switch; + } endpt; /** Transaction layer settings. */ @@ -251,6 +258,9 @@ PJ_INLINE(pjsip_cfg_t*) pjsip_cfg(void) * Disable the behavior of automatic switching to TCP whenever UDP packet * size exceeds the threshold defined in PJSIP_UDP_SIZE_THRESHOLD. * + * This option can also be controlled at run-time by the \a disable_tcp_switch + * setting in pjsip_cfg_t. + * * Default is 0 (no). */ #ifndef PJSIP_DONT_SWITCH_TO_TCP @@ -420,10 +430,10 @@ PJ_INLINE(pjsip_cfg_t*) pjsip_cfg(void) * Idle timeout interval to be applied to transports with no usage * before the transport is destroyed. Value is in seconds. * - * Default: 600 + * Default: 30 */ #ifndef PJSIP_TRANSPORT_IDLE_TIME -# define PJSIP_TRANSPORT_IDLE_TIME 600 +# define PJSIP_TRANSPORT_IDLE_TIME 30 #endif diff --git a/pjsip/include/pjsip/sip_endpoint.h b/pjsip/include/pjsip/sip_endpoint.h index e957271c..c6cf6d65 100644 --- a/pjsip/include/pjsip/sip_endpoint.h +++ b/pjsip/include/pjsip/sip_endpoint.h @@ -62,6 +62,13 @@ PJ_BEGIN_DECL * @{ */ + +/** + * Type of callback to register to pjsip_endpt_atexit(). + */ +typedef void (*pjsip_endpt_exit_callback)(pjsip_endpoint *endpt); + + /** * Create an instance of SIP endpoint from the specified pool factory. * The pool factory reference then will be kept by the endpoint, so that @@ -511,6 +518,21 @@ PJ_DECL(const pjsip_hdr*) pjsip_endpt_get_request_headers(pjsip_endpoint *e); PJ_DECL(void) pjsip_endpt_dump( pjsip_endpoint *endpt, pj_bool_t detail ); +/** + * Register cleanup function to be called by SIP endpoint when + * #pjsip_endpt_destroy() is called. Note that application should not + * use or access any endpoint resource (such as pool, ioqueue, timer heap) + * from within the callback as such resource may have been released when + * the callback function is invoked. + * + * @param endpt The SIP endpoint. + * @param func The function to be registered. + * + * @return PJ_SUCCESS on success. + */ +PJ_DECL(pj_status_t) pjsip_endpt_atexit(pjsip_endpoint *endpt, + pjsip_endpt_exit_callback func); + /** * @} diff --git a/pjsip/include/pjsip/sip_transport.h b/pjsip/include/pjsip/sip_transport.h index a567d1a1..99f006a6 100644 --- a/pjsip/include/pjsip/sip_transport.h +++ b/pjsip/include/pjsip/sip_transport.h @@ -574,6 +574,13 @@ struct pjsip_tx_data pjsip_tpselector tp_sel; /** + * Special flag to indicate that this transmit data is a request that has + * been updated with proper authentication response and is ready to be + * sent for retry. + */ + pj_bool_t auth_retry; + + /** * Arbitrary data attached by PJSIP modules. */ void *mod_data[PJSIP_MAX_MODULE]; diff --git a/pjsip/include/pjsip/sip_transport_tls.h b/pjsip/include/pjsip/sip_transport_tls.h index f9426412..ae823f36 100644 --- a/pjsip/include/pjsip/sip_transport_tls.h +++ b/pjsip/include/pjsip/sip_transport_tls.h @@ -26,6 +26,7 @@ */ #include <pjsip/sip_transport.h> +#include <pj/pool.h> #include <pj/ssl_sock.h> #include <pj/string.h> #include <pj/sock_qos.h> @@ -106,20 +107,19 @@ typedef struct pjsip_tls_setting int method; /** - * TLS cipher list string in OpenSSL format. If empty, then default - * cipher list of the backend will be used. + * Number of ciphers contained in the specified cipher preference. + * If this is set to zero, then default cipher list of the backend + * will be used. + * + * Default: 0 (zero). */ - pj_str_t ciphers; + unsigned ciphers_num; /** - * Optionally specify the server name instance to be contacted when - * making outgoing TLS connection. This setting is useful when the - * server is hosting multiple domains for the same TLS listening - * socket. - * - * Default: empty. + * Ciphers and order preference. The #pj_ssl_cipher_get_availables() + * can be used to check the available ciphers supported by backend. */ - pj_str_t server_name; + pj_ssl_cipher *ciphers; /** * Specifies TLS transport behavior on the server TLS certificate @@ -246,7 +246,13 @@ PJ_INLINE(void) pjsip_tls_setting_copy(pj_pool_t *pool, pj_strdup_with_null(pool, &dst->cert_file, &src->cert_file); pj_strdup_with_null(pool, &dst->privkey_file, &src->privkey_file); pj_strdup_with_null(pool, &dst->password, &src->password); - pj_strdup_with_null(pool, &dst->ciphers, &src->ciphers); + if (src->ciphers_num) { + unsigned i; + dst->ciphers = (pj_ssl_cipher*) pj_pool_calloc(pool, src->ciphers_num, + sizeof(pj_ssl_cipher)); + for (i=0; i<src->ciphers_num; ++i) + dst->ciphers[i] = src->ciphers[i]; + } } |