Changeset 5538
- Timestamp:
- Jan 23, 2017 4:18:59 AM (8 years ago)
- Location:
- pjproject/branches/projects/uwp
- Files:
-
- 45 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/uwp
- Property svn:mergeinfo changed
/pjproject/trunk merged: 5533-5537
- Property svn:mergeinfo changed
-
pjproject/branches/projects/uwp/aconfigure
r5532 r5538 756 756 oldincludedir 757 757 includedir 758 runstatedir759 758 localstatedir 760 759 sharedstatedir … … 879 878 sharedstatedir='${prefix}/com' 880 879 localstatedir='${prefix}/var' 881 runstatedir='${localstatedir}/run'882 880 includedir='${prefix}/include' 883 881 oldincludedir='/usr/include' … … 1132 1130 silent=yes ;; 1133 1131 1134 -runstatedir | --runstatedir | --runstatedi | --runstated \1135 | --runstate | --runstat | --runsta | --runst | --runs \1136 | --run | --ru | --r)1137 ac_prev=runstatedir ;;1138 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \1139 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \1140 | --run=* | --ru=* | --r=*)1141 runstatedir=$ac_optarg ;;1142 1143 1132 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 1144 1133 ac_prev=sbindir ;; … … 1278 1267 datadir sysconfdir sharedstatedir localstatedir includedir \ 1279 1268 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ 1280 libdir localedir mandir runstatedir1269 libdir localedir mandir 1281 1270 do 1282 1271 eval ac_val=\$$ac_var … … 1431 1420 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] 1432 1421 --localstatedir=DIR modifiable single-machine data [PREFIX/var] 1433 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]1434 1422 --libdir=DIR object code libraries [EPREFIX/lib] 1435 1423 --includedir=DIR C header files [PREFIX/include] … … 7866 7854 fi 7867 7855 7868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_ library_initin -lssl" >&57869 $as_echo_n "checking for SSL_ library_initin -lssl... " >&6; }7870 if ${ac_cv_lib_ssl_SSL_ library_init+:} false; then :7856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_new in -lssl" >&5 7857 $as_echo_n "checking for SSL_CTX_new in -lssl... " >&6; } 7858 if ${ac_cv_lib_ssl_SSL_CTX_new+:} false; then : 7871 7859 $as_echo_n "(cached) " >&6 7872 7860 else … … 7882 7870 extern "C" 7883 7871 #endif 7884 char SSL_ library_init();7872 char SSL_CTX_new (); 7885 7873 int 7886 7874 main () 7887 7875 { 7888 return SSL_ library_init();7876 return SSL_CTX_new (); 7889 7877 ; 7890 7878 return 0; … … 7892 7880 _ACEOF 7893 7881 if ac_fn_c_try_link "$LINENO"; then : 7894 ac_cv_lib_ssl_SSL_ library_init=yes7895 else 7896 ac_cv_lib_ssl_SSL_ library_init=no7882 ac_cv_lib_ssl_SSL_CTX_new=yes 7883 else 7884 ac_cv_lib_ssl_SSL_CTX_new=no 7897 7885 fi 7898 7886 rm -f core conftest.err conftest.$ac_objext \ … … 7900 7888 LIBS=$ac_check_lib_save_LIBS 7901 7889 fi 7902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_ library_init" >&57903 $as_echo "$ac_cv_lib_ssl_SSL_ library_init" >&6; }7904 if test "x$ac_cv_lib_ssl_SSL_ library_init" = xyes; then :7890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_CTX_new" >&5 7891 $as_echo "$ac_cv_lib_ssl_SSL_CTX_new" >&6; } 7892 if test "x$ac_cv_lib_ssl_SSL_CTX_new" = xyes; then : 7905 7893 libssl_present=1 && LIBS="-lssl $LIBS" 7906 7894 fi … … 7911 7899 7912 7900 # Check if SRTP should be compiled with OpenSSL 7913 # support, to enable cryptos such as AES GCM 7914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_aes_128_gcm in -lcrypto" >&5 7915 $as_echo_n "checking for EVP_aes_128_gcm in -lcrypto... " >&6; } 7916 if ${ac_cv_lib_crypto_EVP_aes_128_gcm+:} false; then : 7917 $as_echo_n "(cached) " >&6 7918 else 7919 ac_check_lib_save_LIBS=$LIBS 7920 LIBS="-lcrypto $LIBS" 7921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7901 # support, to enable cryptos such as AES GCM. 7902 7903 # EVP_CIPHER_CTX is now opaque in OpenSSL 1.1.0, libsrtp 1.5.4 uses it as a transparent type. 7904 # AC_CHECK_LIB(crypto,EVP_aes_128_gcm,[ac_ssl_has_aes_gcm=1]) 7905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7922 7906 /* end confdefs.h. */ 7923 7924 /* Override any GCC internal prototype to avoid an error. 7925 Use char because int might match the return type of a GCC 7926 builtin and then its argument prototype would still apply. */ 7927 #ifdef __cplusplus 7928 extern "C" 7929 #endif 7930 char EVP_aes_128_gcm (); 7907 #include <openssl/evp.h> 7931 7908 int 7932 7909 main () 7933 7910 { 7934 return EVP_aes_128_gcm();7911 EVP_CIPHER_CTX ctx;EVP_aes_128_gcm(); 7935 7912 ; 7936 7913 return 0; 7937 7914 } 7938 7915 _ACEOF 7939 if ac_fn_c_try_link "$LINENO"; then : 7940 ac_cv_lib_crypto_EVP_aes_128_gcm=yes 7941 else 7942 ac_cv_lib_crypto_EVP_aes_128_gcm=no 7943 fi 7944 rm -f core conftest.err conftest.$ac_objext \ 7945 conftest$ac_exeext conftest.$ac_ext 7946 LIBS=$ac_check_lib_save_LIBS 7947 fi 7948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_aes_128_gcm" >&5 7949 $as_echo "$ac_cv_lib_crypto_EVP_aes_128_gcm" >&6; } 7950 if test "x$ac_cv_lib_crypto_EVP_aes_128_gcm" = xyes; then : 7916 if ac_fn_c_try_compile "$LINENO"; then : 7951 7917 ac_ssl_has_aes_gcm=1 7952 7918 fi 7953 7919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7954 7920 if test "x$ac_ssl_has_aes_gcm" = "x1"; then 7955 7921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL has AES GCM support, SRTP will use OpenSSL" >&5 -
pjproject/branches/projects/uwp/aconfigure.ac
r5532 r5538 1556 1556 AC_CHECK_HEADER(openssl/ssl.h,[openssl_h_present=1]) 1557 1557 AC_CHECK_LIB(crypto,ERR_load_BIO_strings,[libcrypto_present=1 && LIBS="-lcrypto $LIBS"]) 1558 AC_CHECK_LIB(ssl,SSL_ library_init,[libssl_present=1 && LIBS="-lssl $LIBS"])1558 AC_CHECK_LIB(ssl,SSL_CTX_new,[libssl_present=1 && LIBS="-lssl $LIBS"]) 1559 1559 if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then 1560 1560 AC_MSG_RESULT([OpenSSL library found, SSL support enabled]) 1561 1561 1562 1562 # Check if SRTP should be compiled with OpenSSL 1563 # support, to enable cryptos such as AES GCM 1564 AC_CHECK_LIB(crypto,EVP_aes_128_gcm,[ac_ssl_has_aes_gcm=1]) 1563 # support, to enable cryptos such as AES GCM. 1564 1565 # EVP_CIPHER_CTX is now opaque in OpenSSL 1.1.0, libsrtp 1.5.4 uses it as a transparent type. 1566 # AC_CHECK_LIB(crypto,EVP_aes_128_gcm,[ac_ssl_has_aes_gcm=1]) 1567 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <openssl/evp.h>]], 1568 [EVP_CIPHER_CTX ctx;EVP_aes_128_gcm();])], 1569 [ac_ssl_has_aes_gcm=1]) 1565 1570 if test "x$ac_ssl_has_aes_gcm" = "x1"; then 1566 1571 AC_MSG_RESULT([OpenSSL has AES GCM support, SRTP will use OpenSSL]) -
pjproject/branches/projects/uwp/pjlib-util/src/pjlib-util-test/resolver_test.c
r5513 r5538 711 711 rc = pj_dns_parse_a_response(&pkt, &rec); 712 712 pj_assert(rc == PJLIB_UTIL_EDNSNOANSWERREC); 713 PJ_UNUSED_ARG(rc); 713 714 714 715 return 0; … … 920 921 rc = pj_dns_parse_addr_response(&pkt, &rec); 921 922 pj_assert(rc == PJLIB_UTIL_EDNSNOANSWERREC); 923 PJ_UNUSED_ARG(rc); 922 924 923 925 return 0; … … 1469 1471 1470 1472 1471 return 0;1473 return status; 1472 1474 } 1473 1475 … … 1839 1841 pj_sem_wait(sem); 1840 1842 1841 return 0;1843 return status; 1842 1844 } 1843 1845 -
pjproject/branches/projects/uwp/pjlib-util/src/pjlib-util/dns_server.c
r5513 r5538 125 125 } 126 126 127 if (srv->pool) { 128 pj_pool_t *pool = srv->pool; 129 srv->pool = NULL; 130 pj_pool_release(pool); 131 } 127 pj_pool_safe_release(&srv->pool); 132 128 133 129 return PJ_SUCCESS; -
pjproject/branches/projects/uwp/pjlib-util/src/pjlib-util/errno.c
r4704 r5538 185 185 pj_assert(status == PJ_SUCCESS); 186 186 187 return PJ_SUCCESS;187 return status; 188 188 } -
pjproject/branches/projects/uwp/pjlib-util/src/pjlib-util/resolver.c
r5513 r5538 514 514 } 515 515 516 if (resolver->pool) { 517 pj_pool_t *pool = resolver->pool; 518 resolver->pool = NULL; 519 pj_pool_release(pool); 520 } 516 pj_pool_safe_release(&resolver->pool); 517 521 518 return PJ_SUCCESS; 522 519 } -
pjproject/branches/projects/uwp/pjlib-util/src/pjlib-util/srv_resolver.c
r5513 r5538 653 653 } else if (query_job->dns_state == PJ_DNS_TYPE_A) { 654 654 pj_bool_t is_type_a, srv_completed; 655 pj_dns_addr_record rec; 655 656 656 657 /* Clear outstanding job */ … … 669 670 is_type_a = (common->type == PJ_DNS_TYPE_A); 670 671 672 /* Parse response */ 673 if (status==PJ_SUCCESS && pkt->hdr.anscount != 0) { 674 status = pj_dns_parse_addr_response(pkt, &rec); 675 if (status!=PJ_SUCCESS) { 676 char errmsg[PJ_ERR_MSG_SIZE]; 677 678 PJ_LOG(4,(query_job->objname, 679 "DNS %s record parse error for '%.*s'." 680 " Err=%d (%s)", 681 (is_type_a ? "A" : "AAAA"), 682 (int)query_job->domain_part.slen, 683 query_job->domain_part.ptr, 684 status, 685 pj_strerror(status,errmsg,sizeof(errmsg)).ptr)); 686 } 687 } 688 671 689 /* Check that we really have answer */ 672 690 if (status==PJ_SUCCESS && pkt->hdr.anscount != 0) { 673 691 char addr[PJ_INET6_ADDRSTRLEN]; 674 pj_dns_addr_record rec;675 676 /* Parse response */677 status = pj_dns_parse_addr_response(pkt, &rec);678 if (status != PJ_SUCCESS)679 goto on_error;680 692 681 693 pj_assert(rec.addr_count != 0); -
pjproject/branches/projects/uwp/pjlib/include/pj/pool.h
r4537 r5538 391 391 PJ_IDECL(void) pj_pool_release( pj_pool_t *pool ); 392 392 393 394 /** 395 * Release the pool back to pool factory and set the pool pointer to zero. 396 * 397 * @param ppool Pointer to memory pool. 398 */ 399 PJ_IDECL(void) pj_pool_safe_release( pj_pool_t **ppool ); 400 401 393 402 /** 394 403 * Get pool object name. -
pjproject/branches/projects/uwp/pjlib/include/pj/pool_i.h
r4298 r5538 93 93 } 94 94 95 96 PJ_IDEF(void) pj_pool_safe_release( pj_pool_t **ppool ) 97 { 98 pj_pool_t *pool = *ppool; 99 *ppool = NULL; 100 if (pool) 101 pj_pool_release(pool); 102 } -
pjproject/branches/projects/uwp/pjlib/src/pj/ssl_sock_ossl.c
r5532 r5538 46 46 * Include OpenSSL headers 47 47 */ 48 #include <openssl/asn1.h> 48 49 #include <openssl/bio.h> 49 50 #include <openssl/ssl.h> … … 111 112 #endif 112 113 114 115 #if OPENSSL_VERSION_NUMBER >= 0x10100000L 116 # define OPENSSL_NO_SSL2 /* seems to be removed in 1.1.0 */ 117 # define M_ASN1_STRING_data(x) ASN1_STRING_get0_data(x) 118 # define M_ASN1_STRING_length(x) ASN1_STRING_length(x) 119 #else 120 # define SSL_CIPHER_get_id(c) (c)->id 121 # define SSL_set_session(ssl, s) (ssl)->session = (s) 122 #endif 123 124 113 125 #ifdef _MSC_VER 114 126 # pragma comment( lib, "libeay32") 115 127 # pragma comment( lib, "ssleay32") 128 # pragma comment( lib, "crypt32") 116 129 #endif 117 130 … … 432 445 c = sk_SSL_CIPHER_value(sk_cipher,i); 433 446 openssl_ciphers[i].id = (pj_ssl_cipher) 434 (pj_uint32_t)c->id & 0x00FFFFFF; 447 (pj_uint32_t)SSL_CIPHER_get_id(c) & 448 0x00FFFFFF; 435 449 openssl_ciphers[i].name = SSL_CIPHER_get_name(c); 436 450 } 437 451 openssl_cipher_num = n; 438 452 439 ssl->session = SSL_SESSION_new();453 SSL_set_session(ssl, SSL_SESSION_new()); 440 454 441 455 #if !defined(OPENSSL_NO_EC) && OPENSSL_VERSION_NUMBER >= 0x1000200fL … … 1014 1028 c = sk_SSL_CIPHER_value(sk_cipher, j); 1015 1029 if (ssock->param.ciphers[i] == (pj_ssl_cipher) 1016 ((pj_uint32_t)c->id & 0x00FFFFFF)) 1030 ((pj_uint32_t)SSL_CIPHER_get_id(c) & 1031 0x00FFFFFF)) 1017 1032 { 1018 1033 const char *c_name; … … 1067 1082 } 1068 1083 1069 if( ssock->ossl_ssl->server) {1084 if( SSL_is_server(ssock->ossl_ssl) ) { 1070 1085 ret = SSL_set1_curves(ssock->ossl_ssl, curves, 1071 1086 ssock->param.curves_num); … … 1226 1241 char buf[512]; 1227 1242 pj_uint8_t serial_no[64] = {0}; /* should be >= sizeof(ci->serial_no) */ 1228 pj_uint8_t *q;1243 const pj_uint8_t *q; 1229 1244 unsigned len; 1230 1245 GENERAL_NAMES *names = NULL; … … 1236 1251 1237 1252 /* Get serial no */ 1238 q = ( pj_uint8_t*) M_ASN1_STRING_data(X509_get_serialNumber(x));1253 q = (const pj_uint8_t*) M_ASN1_STRING_data(X509_get_serialNumber(x)); 1239 1254 len = M_ASN1_STRING_length(X509_get_serialNumber(x)); 1240 1255 if (len > sizeof(ci->serial_no)) … … 2643 2658 /* Current cipher */ 2644 2659 cipher = SSL_get_current_cipher(ssock->ossl_ssl); 2645 info->cipher = ( cipher->id& 0x00FFFFFF);2660 info->cipher = (SSL_CIPHER_get_id(cipher) & 0x00FFFFFF); 2646 2661 2647 2662 /* Remote address */ -
pjproject/branches/projects/uwp/pjmedia/src/pjmedia-audiodev/legacy_dev.c
r3553 r5538 142 142 143 143 if (status == PJ_SUCCESS) { 144 pj_pool_t *pool = wf->pool; 145 wf->pool = NULL; 146 pj_pool_release(pool); 144 pj_pool_safe_release(&wf->pool); 147 145 } 148 146 … … 456 454 457 455 if (status == PJ_SUCCESS) { 458 pj_pool_t *pool = strm->pool; 459 460 strm->pool = NULL; 461 pj_pool_release(pool); 456 pj_pool_safe_release(&strm->pool); 462 457 } 463 458 -
pjproject/branches/projects/uwp/pjmedia/src/pjmedia-audiodev/null_dev.c
r3553 r5538 161 161 { 162 162 struct null_audio_factory *nf = (struct null_audio_factory*)f; 163 pj_pool_t *pool = nf->pool; 164 165 nf->pool = NULL; 166 pj_pool_release(pool); 163 164 pj_pool_safe_release(&nf->pool); 167 165 168 166 return PJ_SUCCESS; -
pjproject/branches/projects/uwp/pjmedia/src/pjmedia-videodev/avi_dev.c
r4537 r5538 193 193 { 194 194 struct avi_factory *cf = (struct avi_factory*)f; 195 pj_pool_t *pool = cf->pool; 196 197 cf->pool = NULL; 198 pj_pool_release(pool); 195 196 pj_pool_safe_release(&cf->pool); 199 197 200 198 return PJ_SUCCESS; -
pjproject/branches/projects/uwp/pjmedia/src/pjmedia-videodev/colorbar_dev.c
r5050 r5538 253 253 { 254 254 struct cbar_factory *cf = (struct cbar_factory*)f; 255 pj_pool_t *pool = cf->pool; 256 257 cf->pool = NULL; 258 pj_pool_release(pool); 255 256 pj_pool_safe_release(&cf->pool); 259 257 260 258 return PJ_SUCCESS; -
pjproject/branches/projects/uwp/pjmedia/src/pjmedia/clock_thread.c
r4160 r5538 416 416 } 417 417 418 if (clock->pool) { 419 pj_pool_t *pool = clock->pool; 420 clock->pool = NULL; 421 pj_pool_release(pool); 422 } 423 return PJ_SUCCESS; 424 } 425 426 418 pj_pool_safe_release(&clock->pool); 419 420 return PJ_SUCCESS; 421 } 422 423 -
pjproject/branches/projects/uwp/pjmedia/src/pjmedia/stream.c
r5513 r5538 2572 2572 #endif 2573 2573 2574 if (stream->own_pool) { 2575 pj_pool_t *pool = stream->own_pool; 2576 stream->own_pool = NULL; 2577 pj_pool_release(pool); 2578 } 2574 pj_pool_safe_release(&stream->own_pool); 2575 2579 2576 return PJ_SUCCESS; 2580 2577 } -
pjproject/branches/projects/uwp/pjmedia/src/pjmedia/transport_ice.c
r5532 r5538 1879 1879 } 1880 1880 1881 if (tp_ice->pool) { 1882 pj_pool_t *pool = tp_ice->pool; 1883 tp_ice->pool = NULL; 1884 pj_pool_release(pool); 1885 } 1881 pj_pool_safe_release(&tp_ice->pool); 1886 1882 1887 1883 return PJ_SUCCESS; -
pjproject/branches/projects/uwp/pjmedia/src/pjmedia/vid_stream.c
r5532 r5538 1805 1805 #endif 1806 1806 1807 if (stream->own_pool) { 1808 pj_pool_t *pool = stream->own_pool; 1809 stream->own_pool = NULL; 1810 pj_pool_release(pool); 1811 } 1807 pj_pool_safe_release(&stream->own_pool); 1812 1808 1813 1809 return PJ_SUCCESS; -
pjproject/branches/projects/uwp/pjmedia/src/test/mips_test.c
r5170 r5538 716 716 } 717 717 718 return PJ_SUCCESS;718 return status; 719 719 } 720 720 … … 1030 1030 } 1031 1031 1032 return PJ_SUCCESS;1032 return status; 1033 1033 } 1034 1034 … … 1203 1203 } 1204 1204 1205 return PJ_SUCCESS;1205 return status; 1206 1206 } 1207 1207 … … 2094 2094 } 2095 2095 2096 return PJ_SUCCESS;2096 return status; 2097 2097 } 2098 2098 … … 2122 2122 } 2123 2123 2124 return PJ_SUCCESS;2124 return status; 2125 2125 } 2126 2126 … … 2366 2366 } 2367 2367 } 2368 PJ_UNUSED_ARG(status); 2368 2369 pj_get_timestamp(&t1); 2369 2370 -
pjproject/branches/projects/uwp/pjnath/src/pjnath-test/concur_test.c
r5513 r5538 289 289 pj_assert(status == PJ_SUCCESS); 290 290 } 291 PJ_UNUSED_ARG(status); 291 292 292 293 /* Test 1: Main thread calls destroy while callback is processing response */ -
pjproject/branches/projects/uwp/pjnath/src/pjnath-test/ice_test.c
r5513 r5538 403 403 } 404 404 405 if (sess->pool) { 406 pj_pool_t *pool = sess->pool; 407 sess->pool = NULL; 408 pj_pool_release(pool); 409 } 405 pj_pool_safe_release(&sess->pool); 410 406 } 411 407 -
pjproject/branches/projects/uwp/pjnath/src/pjnath-test/server.c
r5513 r5538 255 255 } 256 256 257 if (test_srv->pool) { 258 pj_pool_t *pool = test_srv->pool; 259 test_srv->pool = NULL; 260 pj_pool_release(pool); 261 } 257 pj_pool_safe_release(&test_srv->pool); 262 258 } 263 259 -
pjproject/branches/projects/uwp/pjnath/src/pjnath-test/stun.c
r5170 r5538 319 319 &msg, NULL, &res); 320 320 pj_assert(status != PJ_SUCCESS); 321 PJ_UNUSED_ARG(status); 321 322 pj_assert(res != NULL); 322 323 -
pjproject/branches/projects/uwp/pjnath/src/pjnath/errno.c
r4613 r5538 185 185 pj_assert(status == PJ_SUCCESS); 186 186 187 return PJ_SUCCESS;187 return status; 188 188 } 189 189 -
pjproject/branches/projects/uwp/pjnath/src/pjnath/ice_session.c
r5513 r5538 462 462 pj_ice_sess *ice = (pj_ice_sess*) obj; 463 463 464 if (ice->pool) { 465 pj_pool_t *pool = ice->pool; 466 ice->pool = NULL; 467 pj_pool_release(pool); 468 } 464 pj_pool_safe_release(&ice->pool); 465 469 466 LOG4((THIS_FILE, "ICE session %p destroyed", ice)); 470 467 } -
pjproject/branches/projects/uwp/pjnath/src/pjnath/stun_sock.c
r5513 r5538 475 475 */ 476 476 477 if (stun_sock->pool) { 478 pj_pool_t *pool = stun_sock->pool; 479 stun_sock->pool = NULL; 480 pj_pool_release(pool); 481 } 477 pj_pool_safe_release(&stun_sock->pool); 482 478 483 479 TRACE_(("", "STUN sock %p destroyed", stun_sock)); -
pjproject/branches/projects/uwp/pjnath/src/pjnath/turn_session.c
r5513 r5538 329 329 /* Destroy pool */ 330 330 if (sess->pool) { 331 pj_pool_t *pool = sess->pool;332 333 331 PJ_LOG(4,(sess->obj_name, "TURN client session destroyed")); 334 335 sess->pool = NULL; 336 pj_pool_release(pool); 332 pj_pool_safe_release(&sess->pool); 337 333 } 338 334 } -
pjproject/branches/projects/uwp/pjnath/src/pjnath/turn_sock.c
r5532 r5538 218 218 219 219 if (turn_sock->pool) { 220 pj_pool_t *pool = turn_sock->pool;221 220 PJ_LOG(4,(turn_sock->obj_name, "TURN socket destroyed")); 222 turn_sock->pool = NULL; 223 pj_pool_release(pool); 221 pj_pool_safe_release(&turn_sock->pool); 224 222 } 225 223 } -
pjproject/branches/projects/uwp/pjsip-apps/src/pjsua/pjsua_app.c
r5513 r5538 2011 2011 } 2012 2012 2013 if (app_config.pool) { 2014 pj_pool_release(app_config.pool); 2015 app_config.pool = NULL; 2016 } 2013 pj_pool_safe_release(&app_config.pool); 2017 2014 2018 2015 status = pjsua_destroy(); -
pjproject/branches/projects/uwp/pjsip-apps/src/pjsua/pjsua_app_cli.c
r5513 r5538 208 208 if (app_config.cli_cfg.cli_fe & CLI_FE_TELNET) { 209 209 pj_cli_telnet_cfg *fe_cfg = &app_config.cli_cfg.telnet_cfg; 210 pj_pool_t *pool;211 212 pool = pj_pool_create(cfg->pf, "cli_cp", 128, 128, NULL);213 pj_assert(pool);214 210 215 211 status = pj_cli_telnet_create(cli, fe_cfg, &telnet_front_end); -
pjproject/branches/projects/uwp/pjsip-apps/src/samples/aectest.c
r5513 r5538 301 301 puts("ENTER to quit"); 302 302 dummy = fgets(s, sizeof(s), stdin); 303 PJ_UNUSED_ARG(dummy); 303 304 } 304 305 -
pjproject/branches/projects/uwp/pjsip-apps/src/samples/auddemo.c
r3664 r5538 297 297 PJ_LOG(3,(THIS_FILE, "Recording started, press ENTER to stop")); 298 298 dummy = fgets(line, sizeof(line), stdin); 299 PJ_UNUSED_ARG(dummy); 299 300 300 301 on_return: … … 364 365 PJ_LOG(3,(THIS_FILE, "Playback started, press ENTER to stop")); 365 366 dummy = fgets(line, sizeof(line), stdin); 367 PJ_UNUSED_ARG(dummy); 366 368 367 369 on_return: -
pjproject/branches/projects/uwp/pjsip-apps/src/samples/aviplay.c
r4815 r5538 468 468 puts("Error: filename required"); 469 469 puts(desc); 470 return 1 ;470 return 110; 471 471 } 472 472 … … 474 474 /* Must init PJLIB first: */ 475 475 status = pj_init(); 476 PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1 );476 PJ_ASSERT_RETURN(status == PJ_SUCCESS, 120); 477 477 478 478 /* Must create a pool factory before we can allocate any memory. */ … … 493 493 494 494 status = pjmedia_vid_dev_subsys_init(&cp.factory); 495 if (status != PJ_SUCCESS) 495 if (status != PJ_SUCCESS) { 496 rc = 130; 496 497 goto on_return; 498 } 497 499 498 500 status = pjmedia_aud_subsys_init(&cp.factory); 499 501 if (status != PJ_SUCCESS) { 502 rc = 140; 500 503 goto on_return; 501 504 } … … 503 506 #if defined(PJMEDIA_HAS_OPENH264_CODEC) && PJMEDIA_HAS_OPENH264_CODEC != 0 504 507 status = pjmedia_codec_openh264_vid_init(NULL, &cp.factory); 505 if (status != PJ_SUCCESS) 508 if (status != PJ_SUCCESS) { 509 rc = 150; 506 510 goto on_return; 511 } 507 512 #endif 508 513 509 514 #if PJMEDIA_HAS_FFMPEG_VID_CODEC 510 515 status = pjmedia_codec_ffmpeg_vid_init(NULL, &cp.factory); 511 if (status != PJ_SUCCESS) 516 if (status != PJ_SUCCESS) { 517 rc = 160; 512 518 goto on_return; 519 } 513 520 #endif 514 521 … … 549 556 550 557 /* Done. */ 551 return 0;558 return rc; 552 559 } 553 560 -
pjproject/branches/projects/uwp/pjsip-apps/src/samples/pjsip-perf.c
r5513 r5538 1476 1476 status = submit_job(); 1477 1477 } 1478 PJ_UNUSED_ARG(status); 1478 1479 1479 1480 ++app.client.job_submitted; -
pjproject/branches/projects/uwp/pjsip-apps/src/samples/siprtp.c
r5513 r5538 1398 1398 { 1399 1399 struct call *call; 1400 pj_pool_t *pool;1401 1400 struct media_stream *audio; 1402 1401 const pjmedia_sdp_session *local_sdp, *remote_sdp; … … 1405 1404 1406 1405 call = inv->mod_data[mod_siprtp.id]; 1407 pool = inv->dlg->pool;1408 1406 audio = &call->media[0]; 1409 1407 -
pjproject/branches/projects/uwp/pjsip/src/pjsip/sip_transport_loop.c
r5024 r5538 191 191 &recv_pkt->rdata); 192 192 pj_assert(size_eaten == recv_pkt->rdata.pkt_info.len); 193 PJ_UNUSED_ARG(size_eaten); 193 194 194 195 pjsip_endpt_release_pool(loop->base.endpt, … … 337 338 /* Must "eat" all the packets. */ 338 339 pj_assert(size_eaten == node->rdata.pkt_info.len); 340 PJ_UNUSED_ARG(size_eaten); 339 341 340 342 /* Done. */ -
pjproject/branches/projects/uwp/pjsip/src/pjsip/sip_transport_tcp.c
r5513 r5538 567 567 568 568 if (listener->factory.pool) { 569 pj_pool_t *pool = listener->factory.pool;570 571 569 PJ_LOG(4,(listener->factory.obj_name, "SIP TCP transport destroyed")); 572 573 listener->factory.pool = NULL; 574 pj_pool_release(pool); 570 pj_pool_safe_release(&listener->factory.pool); 575 571 } 576 572 } -
pjproject/branches/projects/uwp/pjsip/src/pjsip/sip_transport_tls.c
r5513 r5538 604 604 605 605 if (listener->factory.pool) { 606 pj_pool_t *pool = listener->factory.pool;607 608 606 PJ_LOG(4,(listener->factory.obj_name, "SIP TLS transport destroyed")); 609 610 listener->factory.pool = NULL; 611 pj_pool_release(pool); 607 pj_pool_safe_release(&listener->factory.pool); 612 608 } 613 609 } -
pjproject/branches/projects/uwp/pjsip/src/pjsua-lib/pjsua_acc.c
r5513 r5538 2600 2600 uri, acc->cfg.reg_uri.slen+10); 2601 2601 pj_assert(d > 0); 2602 PJ_UNUSED_ARG(d); 2602 2603 2603 2604 h = pjsip_authorization_hdr_create(tdata->pool); -
pjproject/branches/projects/uwp/pjsip/src/pjsua-lib/pjsua_call.c
r5513 r5538 3317 3317 /* Verify that media must be active. */ 3318 3318 pj_assert(loc_m->desc.port && rem_m->desc.port); 3319 PJ_UNUSED_ARG(loc_m); 3319 3320 3320 3321 /* Count the formats in the answer. */ -
pjproject/branches/projects/uwp/pjsip/src/pjsua-lib/pjsua_media.c
r5532 r5538 2252 2252 if (call->inv && call->inv->neg) 2253 2253 sdp_neg_state = pjmedia_sdp_neg_get_state(call->inv->neg); 2254 2255 PJ_UNUSED_ARG(sdp_neg_state); 2254 2256 2255 2257 /* Get one address to use in the origin field */ -
pjproject/branches/projects/uwp/pjsip/src/test/inv_offer_answer_test.c
r5513 r5538 185 185 status = pjmedia_sdp_parse(pool, dup.ptr, dup.slen, &sdp); 186 186 pj_assert(status == PJ_SUCCESS); 187 PJ_UNUSED_ARG(status); 187 188 188 189 return sdp; … … 336 337 pj_assert(status == PJ_SUCCESS); 337 338 338 return PJ_TRUE;339 return (status == PJ_SUCCESS); 339 340 } 340 341 … … 393 394 break; 394 395 } 396 PJ_UNUSED_ARG(status); 395 397 } 396 398 … … 677 679 status = pjsip_udp_transport_start(endpt, &addr, NULL, 1, &tp); 678 680 pj_assert(status == PJ_SUCCESS); 681 PJ_UNUSED_ARG(status); 679 682 } 680 683 -
pjproject/branches/projects/uwp/pjsip/src/test/regc_test.c
r5024 r5538 205 205 pj_assert(status == PJ_SUCCESS); 206 206 207 return PJ_TRUE;207 return (status == PJ_SUCCESS); 208 208 } 209 209 … … 243 243 status = pjsip_regc_get_info(param->regc, &info); 244 244 pj_assert(status == PJ_SUCCESS); 245 PJ_UNUSED_ARG(status); 245 246 246 247 client->error = (param->status != PJ_SUCCESS); -
pjproject/branches/projects/uwp/pjsip/src/test/tsx_uac_test.c
r4420 r5538 778 778 pjsip_endpt_schedule_timer(endpt, &timer.entry, &delay); 779 779 780 return PJ_TRUE; 781 780 return (status == PJ_SUCCESS); 782 781 783 782 } else … … 851 850 */ 852 851 pjsip_method *method; 853 pj_status_t status ;852 pj_status_t status = PJ_SUCCESS; 854 853 855 854 method = &rdata->msg_info.msg->line.req.method; … … 934 933 } 935 934 936 return PJ_TRUE;935 return (status == PJ_SUCCESS); 937 936 938 937 }
Note: See TracChangeset
for help on using the changeset viewer.