Changeset 4406
- Timestamp:
- 10/03/06 10:02:50 (2 years ago)
- Files:
-
- trackerd/trunk/trackerd/servers.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trackerd/trunk/trackerd/servers.c
r4405 r4406 241 241 wi_boolean_t changed = false; 242 242 243 wi_hash_wrlock(wt_servers); 244 243 245 if(wi_hash_count(wt_servers) > 0) { 244 246 interval = wi_time_interval(); 245 247 246 wi_hash_wrlock(wt_servers);247 248 248 enumerator = wi_array_data_enumerator(wi_hash_all_keys(wt_servers)); 249 249 … … 262 262 } 263 263 } 264 265 wi_hash_unlock(wt_servers); 266 267 if(changed) { 268 wi_lock_lock(wt_status_lock);269 wt_write_status(true);270 wi_lock_unlock(wt_status_lock);271 272 wt_write_servers(); 273 }264 } 265 266 wi_hash_unlock(wt_servers); 267 268 if(changed) { 269 wi_lock_lock(wt_status_lock); 270 wt_write_status(true); 271 wi_lock_unlock(wt_status_lock); 272 273 wt_write_servers(); 274 274 } 275 275 } … … 305 305 while((server = wi_enumerator_next_data(enumerator))) { 306 306 if(wi_is_equal(server->ip, ip)) { 307 value = server;307 value = wi_autorelease(wi_retain(server)); 308 308 309 309 break; … … 322 322 323 323 wi_hash_rdlock(wt_servers); 324 server = wi_ retain(wi_hash_data_for_key(wt_servers, key));325 wi_hash_unlock(wt_servers); 326 327 return wi_autorelease(server);324 server = wi_autorelease(wi_retain(wi_hash_data_for_key(wt_servers, key))); 325 wi_hash_unlock(wt_servers); 326 327 return server; 328 328 } 329 329
