Changeset 4571

Show
Ignore:
Timestamp:
02/10/07 01:50:36 (1 year ago)
Author:
morris
Message:

Remove unused buffer

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trackerd/trunk/trackerd/clients.c

    r4407 r4571  
    6565 
    6666wt_client_t * wt_client_init_with_socket(wt_client_t *client, wi_socket_t *socket) { 
    67         client->buffer_size             = WT_CLIENT_BUFFER_INITIAL_SIZE; 
    68         client->buffer                  = wi_malloc(client->buffer_size); 
    6967        client->socket                  = wi_retain(socket); 
    7068        client->state                   = WT_CLIENT_STATE_CONNECTED; 
     
    8381        wi_release(client->ip); 
    8482        wi_release(client->version); 
    85          
    86         wi_free(client->buffer); 
    8783} 
    8884 
  • trackerd/trunk/trackerd/commands.c

    r4570 r4571  
    9191 
    9292        while(client->state <= WT_CLIENT_STATE_SAID_HELLO) { 
    93                 if(client->buffer_offset == 0) { 
    94                         do { 
    95                                 state = wi_socket_wait(client->socket, 0.1); 
    96                         } while(state == WI_SOCKET_TIMEOUT && client->state <= WT_CLIENT_STATE_SAID_HELLO); 
    97  
    98                         if(client->state > WT_CLIENT_STATE_SAID_HELLO) { 
    99                                 /* invalid state */ 
     93                do { 
     94                        state = wi_socket_wait(client->socket, 0.1); 
     95                } while(state == WI_SOCKET_TIMEOUT && client->state <= WT_CLIENT_STATE_SAID_HELLO); 
     96 
     97                if(client->state > WT_CLIENT_STATE_SAID_HELLO) { 
     98                        /* invalid state */ 
     99                        break; 
     100                } 
     101 
     102                if(state == WI_SOCKET_ERROR) { 
     103                        if(wi_error_code() == EINTR) { 
     104                                /* got a signal */ 
     105                                continue; 
     106                        } else { 
     107                                /* error in TCP communication */ 
     108                                wi_log_err(WI_STR("Could not read from %@: %m"), client->ip); 
     109 
    100110                                break; 
    101                         } 
    102  
    103                         if(state == WI_SOCKET_ERROR) { 
    104                                 if(wi_error_code() == EINTR) { 
    105                                         /* got a signal */ 
    106                                         continue; 
    107                                 } else { 
    108                                         /* error in TCP communication */ 
    109                                         wi_log_err(WI_STR("Could not read from %@: %m"), client->ip); 
    110  
    111                                         break; 
    112                                 } 
    113111                        } 
    114112                }