Changeset 3999 for pjproject/trunk/pjlib/src/pj/os_core_win32.c
- Timestamp:
- Mar 30, 2012 7:10:13 AM (13 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk
-
pjproject/trunk/pjlib/src/pj/os_core_win32.c
r3855 r3999 118 118 119 119 /* 120 * Flag and reference counter for PJLIB instance. 121 */ 122 static int initialized; 123 124 /* 120 125 * Static global variables. 121 126 */ … … 142 147 pj_str_t guid; 143 148 pj_status_t rc; 149 150 /* Check if PJLIB have been initialized */ 151 if (initialized) { 152 ++initialized; 153 return PJ_SUCCESS; 154 } 144 155 145 156 /* Init Winsock.. */ … … 188 199 #endif 189 200 201 /* Flag PJLIB as initialized */ 202 ++initialized; 203 pj_assert(initialized == 1); 204 190 205 PJ_LOG(4,(THIS_FILE, "pjlib %s for win32 initialized", 191 206 PJ_VERSION)); … … 213 228 { 214 229 int i; 230 231 /* Only perform shutdown operation when 'initialized' reaches zero */ 232 pj_assert(initialized > 0); 233 if (--initialized != 0) 234 return; 215 235 216 236 /* Display stack usage */
Note: See TracChangeset
for help on using the changeset viewer.