Changeset 3999 for pjproject/trunk/pjlib/src/pj/os_core_symbian.cpp
- Timestamp:
- Mar 30, 2012 7:10:13 AM (12 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk
-
pjproject/trunk/pjlib/src/pj/os_core_symbian.cpp
r3664 r3999 76 76 }; 77 77 78 /* Flag and reference counter for PJLIB instance */ 79 static int initialized; 80 78 81 /* Flags to indicate which TLS variables have been used */ 79 82 static int tls_vars[PJ_MAX_TLS]; … … 82 85 static unsigned atexit_count; 83 86 static void (*atexit_func[32])(void); 84 85 86 87 87 88 … … 336 337 pj_status_t status; 337 338 339 /* Check if PJLIB have been initialized */ 340 if (initialized) { 341 ++initialized; 342 return PJ_SUCCESS; 343 } 344 338 345 pj_ansi_strcpy(main_thread.obj_name, "pjthread"); 339 346 … … 369 376 #endif 370 377 378 /* Flag PJLIB as initialized */ 379 ++initialized; 380 pj_assert(initialized == 1); 381 371 382 PJ_LOG(5,(THIS_FILE, "PJLIB initialized.")); 372 383 return PJ_SUCCESS; … … 391 402 PJ_DEF(void) pj_shutdown(void) 392 403 { 404 /* Only perform shutdown operation when 'initialized' reaches zero */ 405 pj_assert(initialized > 0); 406 if (--initialized != 0) 407 return; 408 393 409 /* Call atexit() functions */ 394 410 while (atexit_count > 0) {
Note: See TracChangeset
for help on using the changeset viewer.