- Timestamp:
- Mar 16, 2011 7:34:16 AM (14 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib-util/src/pjlib-util/errno.c
r3087 r3455 20 20 #include <pjlib-util/errno.h> 21 21 #include <pjlib-util/types.h> 22 #include <pj/assert.h> 22 23 #include <pj/string.h> 23 24 … … 163 164 PJ_DEF(pj_status_t) pjlib_util_init(void) 164 165 { 165 return pj_register_strerror(PJLIB_UTIL_ERRNO_START, 166 PJ_ERRNO_SPACE_SIZE, 167 &pjlib_util_strerror); 166 pj_status_t status; 167 168 status = pj_register_strerror(PJLIB_UTIL_ERRNO_START, 169 PJ_ERRNO_SPACE_SIZE, 170 &pjlib_util_strerror); 171 pj_assert(status == PJ_SUCCESS); 172 173 return PJ_SUCCESS; 168 174 } -
pjproject/trunk/pjlib/src/pj/errno.c
r3255 r3455 129 129 IN_RANGE(start+space-1, err_msg_hnd[i].begin, err_msg_hnd[i].end)) 130 130 { 131 if (err_msg_hnd[i].begin == start && 132 err_msg_hnd[i].end == (start+space) && 133 err_msg_hnd[i].strerror == f) 134 { 135 /* The same range and handler has already been registered */ 136 return PJ_SUCCESS; 137 } 138 131 139 return PJ_EEXISTS; 132 140 } -
pjproject/trunk/pjlib/src/pj/ssl_sock_ossl.c
r3225 r3455 268 268 /* OpenSSL library initialization counter */ 269 269 static int openssl_init_count; 270 static int openssl_reg_strerr;271 270 272 271 /* OpenSSL available ciphers */ … … 281 280 static pj_status_t init_openssl(void) 282 281 { 282 pj_status_t status; 283 283 284 if (openssl_init_count) 284 285 return PJ_SUCCESS; … … 287 288 288 289 /* Register error subsystem */ 289 if (!openssl_reg_strerr) { 290 pj_status_t status; 291 292 openssl_reg_strerr = 1; 293 status = pj_register_strerror(PJ_SSL_ERRNO_START, 294 PJ_SSL_ERRNO_SPACE_SIZE, 295 &ssl_strerror); 296 pj_assert(status == PJ_SUCCESS); 297 } 290 status = pj_register_strerror(PJ_SSL_ERRNO_START, 291 PJ_SSL_ERRNO_SPACE_SIZE, 292 &ssl_strerror); 293 pj_assert(status == PJ_SUCCESS); 298 294 299 295 /* Init OpenSSL lib */ -
pjproject/trunk/pjmedia/src/pjmedia-audiodev/audiodev.c
r3440 r3455 365 365 { 366 366 unsigned i; 367 pj_status_t status = PJ_SUCCESS;367 pj_status_t status; 368 368 369 369 /* Allow init() to be called multiple times as long as there is matching … … 375 375 376 376 /* Register error subsystem */ 377 pj_register_strerror(PJMEDIA_AUDIODEV_ERRNO_START, 378 PJ_ERRNO_SPACE_SIZE, 379 &pjmedia_audiodev_strerror); 377 status = pj_register_strerror(PJMEDIA_AUDIODEV_ERRNO_START, 378 PJ_ERRNO_SPACE_SIZE, 379 &pjmedia_audiodev_strerror); 380 pj_assert(status == PJ_SUCCESS); 380 381 381 382 /* Init */ -
pjproject/trunk/pjmedia/src/pjmedia/endpoint.c
r3360 r3455 44 44 45 45 46 /* Flag to indicate whether pjmedia error subsystem has been registered47 * to pjlib.48 */49 static int error_subsys_registered;50 51 46 /* Config to control rtpmap inclusion for static payload types */ 52 47 pj_bool_t pjmedia_add_rtpmap_for_static_pt = … … 106 101 pj_status_t status; 107 102 108 if (!error_subsys_registered) { 109 pj_register_strerror(PJMEDIA_ERRNO_START, PJ_ERRNO_SPACE_SIZE, 110 &pjmedia_strerror); 111 error_subsys_registered = 1; 112 } 103 status = pj_register_strerror(PJMEDIA_ERRNO_START, PJ_ERRNO_SPACE_SIZE, 104 &pjmedia_strerror); 105 pj_assert(status == PJ_SUCCESS); 113 106 114 107 PJ_ASSERT_RETURN(pf && p_endpt, PJ_EINVAL); -
pjproject/trunk/pjnath/src/pjnath/errno.c
r2724 r3455 20 20 #include <pjnath/errno.h> 21 21 #include <pjnath/stun_msg.h> 22 #include <pj/assert.h> 22 23 #include <pj/log.h> 23 24 #include <pj/string.h> … … 177 178 status = pj_register_strerror(PJNATH_ERRNO_START, 299, 178 179 &pjnath_strerror); 179 if (status != PJ_SUCCESS) 180 return status; 180 pj_assert(status == PJ_SUCCESS); 181 181 182 182 status = pj_register_strerror(PJ_STATUS_FROM_STUN_CODE(300), 183 183 699 - 300, 184 184 &pjnath_strerror2); 185 return status; 185 pj_assert(status == PJ_SUCCESS); 186 187 return PJ_SUCCESS; 186 188 } 187 189 -
pjproject/trunk/pjsip-apps/src/samples/latency.c
r2394 r3455 169 169 ); 170 170 171 pj_register_strerror(PJMEDIA_ERRNO_START, PJ_ERRNO_SPACE_SIZE, 172 &pjmedia_strerror); 171 status = pj_register_strerror(PJMEDIA_ERRNO_START, PJ_ERRNO_SPACE_SIZE, 172 &pjmedia_strerror); 173 pj_assert(status == PJ_SUCCESS); 173 174 174 175 /* Wav */ -
pjproject/trunk/pjsip/src/pjsip-simple/evsub.c
r3412 r3455 288 288 }; 289 289 290 pj_register_strerror(PJSIP_SIMPLE_ERRNO_START, PJ_ERRNO_SPACE_SIZE, 291 &pjsipsimple_strerror); 290 status = pj_register_strerror(PJSIP_SIMPLE_ERRNO_START, 291 PJ_ERRNO_SPACE_SIZE, 292 &pjsipsimple_strerror); 293 pj_assert(status == PJ_SUCCESS); 292 294 293 295 PJ_ASSERT_RETURN(endpt != NULL, PJ_EINVAL); -
pjproject/trunk/pjsip/src/pjsip/sip_endpoint.c
r3106 r3455 118 118 119 119 120 /* Specifies whether error subsystem has been registered to pjlib. */121 static int error_subsys_initialized;122 123 120 /* 124 121 * This is the global handler for memory allocation failure, for pools that … … 426 423 427 424 428 if (!error_subsys_initialized) { 429 pj_register_strerror(PJSIP_ERRNO_START, PJ_ERRNO_SPACE_SIZE, 430 &pjsip_strerror); 431 error_subsys_initialized = 1; 432 } 425 status = pj_register_strerror(PJSIP_ERRNO_START, PJ_ERRNO_SPACE_SIZE, 426 &pjsip_strerror); 427 pj_assert(status == PJ_SUCCESS); 433 428 434 429 PJ_LOG(5, (THIS_FILE, "Creating endpoint instance..."));
Note: See TracChangeset
for help on using the changeset viewer.