Changeset 3938
- Timestamp:
- 03/21/06 19:29:35 (3 years ago)
- Files:
-
- wired/trunk/wired/commands.c (modified) (3 diffs)
- wired/trunk/wired/files.c (modified) (3 diffs)
- wired/trunk/wired/server.c (modified) (6 diffs)
- wired/trunk/wired/transfers.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wired/trunk/wired/commands.c
r3934 r3938 222 222 223 223 void wd_control_thread(wi_runtime_instance_t *argument) { 224 wi_pool_t *pool , *loop_pool = NULL;224 wi_pool_t *pool; 225 225 wd_client_t *client = argument; 226 226 wi_string_t *string; … … 234 234 235 235 while(client->state <= WD_CLIENT_STATE_LOGGED_IN) { 236 if(! loop_pool)237 loop_pool = wi_pool_init(wi_pool_alloc());236 if(!pool) 237 pool = wi_pool_init(wi_pool_alloc()); 238 238 239 239 if(client->buffer_offset == 0) { … … 274 274 275 275 if(++i % 10 == 0) { 276 wi_release( loop_pool);277 loop_pool = NULL;276 wi_release(pool); 277 pool = NULL; 278 278 } 279 279 } wired/trunk/wired/files.c
r3934 r3938 788 788 789 789 static void wd_files_index_path(wi_string_t *path, wi_file_t *file, const char *pathprefix) { 790 wi_pool_t *pool , *loop_pool = NULL;790 wi_pool_t *pool; 791 791 WI_FTS *fts = NULL; 792 792 WI_FTSENT *p; … … 825 825 826 826 while((p = wi_fts_read(fts))) { 827 if(! loop_pool)828 loop_pool = wi_pool_init(wi_pool_alloc());827 if(!pool) 828 pool = wi_pool_init(wi_pool_alloc()); 829 829 830 830 /* skip item? */ … … 928 928 next: 929 929 if(++i % 100 == 0) { 930 wi_release( loop_pool);931 loop_pool = NULL;930 wi_release(pool); 931 pool = NULL; 932 932 } 933 933 } wired/trunk/wired/server.c
r3934 r3938 271 271 272 272 static void wd_control_listen_thread(wi_runtime_instance_t *argument) { 273 wi_pool_t *pool , *loop_pool = NULL;273 wi_pool_t *pool; 274 274 wi_socket_t *socket; 275 275 wi_address_t *address; … … 281 281 282 282 while(wd_running) { 283 if(! loop_pool)284 loop_pool = wi_pool_init(wi_pool_alloc());283 if(!pool) 284 pool = wi_pool_init(wi_pool_alloc()); 285 285 286 286 /* accept new client */ … … 313 313 next: 314 314 if(++i % 10 == 0) { 315 wi_release( loop_pool);316 loop_pool = NULL;315 wi_release(pool); 316 pool = NULL; 317 317 } 318 318 } … … 324 324 325 325 static void wd_transfer_listen_thread(wi_runtime_instance_t *argument) { 326 wi_pool_t *pool , *loop_pool = NULL;326 wi_pool_t *pool; 327 327 wi_socket_t *socket; 328 328 wi_address_t *address; … … 335 335 336 336 while(wd_running) { 337 if(! loop_pool)338 loop_pool = wi_pool_init(wi_pool_alloc());337 if(!pool) 338 pool = wi_pool_init(wi_pool_alloc()); 339 339 340 340 /* accept new connection */ … … 386 386 next: 387 387 if(++i % 10 == 0) { 388 wi_release( loop_pool);389 loop_pool = NULL;388 wi_release(pool); 389 pool = NULL; 390 390 } 391 391 } wired/trunk/wired/transfers.c
r3934 r3938 565 565 566 566 static void wd_transfer_download(wd_transfer_t *transfer) { 567 wi_pool_t *pool , *loop_pool = NULL;567 wi_pool_t *pool; 568 568 SSL *ssl; 569 569 char buffer[WD_TRANSFER_BUFFER_SIZE]; … … 605 605 606 606 while(transfer->state == WD_TRANSFER_RUNNING) { 607 if(! loop_pool)608 loop_pool = wi_pool_init(wi_pool_alloc());607 if(!pool) 608 pool = wi_pool_init(wi_pool_alloc()); 609 609 610 610 /* read data */ … … 669 669 670 670 if(++i % 100 == 0) { 671 wi_release( loop_pool);672 loop_pool = NULL;671 wi_release(pool); 672 pool = NULL; 673 673 } 674 674 }
