Changeset 3934

Show
Ignore:
Timestamp:
03/21/06 19:17:37 (2 years ago)
Author:
morris
Message:

Sync with trackerd

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wired/trunk/wired/commands.c

    r3865 r3934  
    222222 
    223223void wd_control_thread(wi_runtime_instance_t *argument) { 
    224         wi_pool_t               *pool
     224        wi_pool_t               *pool, *loop_pool = NULL
    225225        wd_client_t             *client = argument; 
    226226        wi_string_t             *string; 
     
    234234 
    235235        while(client->state <= WD_CLIENT_STATE_LOGGED_IN) { 
    236                 if(!pool) 
    237                         pool = wi_pool_init(wi_pool_alloc()); 
     236                if(!loop_pool) 
     237                        loop_pool = wi_pool_init(wi_pool_alloc()); 
    238238                 
    239239                if(client->buffer_offset == 0) { 
     
    274274                 
    275275                if(++i % 10 == 0) { 
    276                         wi_release(pool); 
    277                         pool = NULL; 
     276                        wi_release(loop_pool); 
     277                        loop_pool = NULL; 
    278278                } 
    279279        } 
  • wired/trunk/wired/files.c

    r3892 r3934  
    788788 
    789789static void wd_files_index_path(wi_string_t *path, wi_file_t *file, const char *pathprefix) { 
    790         wi_pool_t                               *pool
     790        wi_pool_t                               *pool, *loop_pool = NULL
    791791        WI_FTS                                  *fts = NULL; 
    792792        WI_FTSENT                               *p; 
     
    825825         
    826826        while((p = wi_fts_read(fts))) { 
    827                 if(!pool) 
    828                         pool = wi_pool_init(wi_pool_alloc()); 
     827                if(!loop_pool) 
     828                        loop_pool = wi_pool_init(wi_pool_alloc()); 
    829829                 
    830830                /* skip item? */ 
     
    928928next: 
    929929                if(++i % 100 == 0) { 
    930                         wi_release(pool); 
    931                         pool = NULL; 
     930                        wi_release(loop_pool); 
     931                        loop_pool = NULL; 
    932932                } 
    933933        } 
  • wired/trunk/wired/server.c

    r3904 r3934  
    271271 
    272272static void wd_control_listen_thread(wi_runtime_instance_t *argument) { 
    273         wi_pool_t                       *pool
     273        wi_pool_t                       *pool, *loop_pool = NULL
    274274        wi_socket_t                     *socket; 
    275275        wi_address_t            *address; 
     
    281281 
    282282        while(wd_running) { 
    283                 if(!pool) 
    284                         pool = wi_pool_init(wi_pool_alloc()); 
     283                if(!loop_pool) 
     284                        loop_pool = wi_pool_init(wi_pool_alloc()); 
    285285                 
    286286                /* accept new client */ 
     
    313313next: 
    314314                if(++i % 10 == 0) { 
    315                         wi_release(pool); 
    316                         pool = NULL; 
     315                        wi_release(loop_pool); 
     316                        loop_pool = NULL; 
    317317                } 
    318318        } 
     
    324324 
    325325static void wd_transfer_listen_thread(wi_runtime_instance_t *argument) { 
    326         wi_pool_t                       *pool
     326        wi_pool_t                       *pool, *loop_pool = NULL
    327327        wi_socket_t                     *socket; 
    328328        wi_address_t            *address; 
     
    335335 
    336336        while(wd_running) { 
    337                 if(!pool) 
    338                         pool = wi_pool_init(wi_pool_alloc()); 
     337                if(!loop_pool) 
     338                        loop_pool = wi_pool_init(wi_pool_alloc()); 
    339339                 
    340340                /* accept new connection */ 
     
    386386next: 
    387387                if(++i % 10 == 0) { 
    388                         wi_release(pool); 
    389                         pool = NULL; 
     388                        wi_release(loop_pool); 
     389                        loop_pool = NULL; 
    390390                } 
    391391        } 
  • wired/trunk/wired/transfers.c

    r3869 r3934  
    565565 
    566566static void wd_transfer_download(wd_transfer_t *transfer) { 
    567         wi_pool_t                               *pool
     567        wi_pool_t                               *pool, *loop_pool = NULL
    568568        SSL                                             *ssl; 
    569569        char                                    buffer[WD_TRANSFER_BUFFER_SIZE]; 
     
    605605 
    606606        while(transfer->state == WD_TRANSFER_RUNNING) { 
    607                 if(!pool) 
    608                         pool = wi_pool_init(wi_pool_alloc()); 
     607                if(!loop_pool) 
     608                        loop_pool = wi_pool_init(wi_pool_alloc()); 
    609609                 
    610610                /* read data */ 
     
    669669                 
    670670                if(++i % 100 == 0) { 
    671                         wi_release(pool); 
    672                         pool = NULL; 
     671                        wi_release(loop_pool); 
     672                        loop_pool = NULL; 
    673673                } 
    674674        }