Changeset 4428

Show
Ignore:
Timestamp:
01/25/07 15:58:09 (1 year ago)
Author:
morris
Message:

Update for libwired

Files:

Legend:

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

    r4407 r4428  
    5454 
    5555        char                                                            *buffer; 
    56         unsigned int                                          buffer_size; 
    57         unsigned int                                          buffer_offset; 
     56        wi_uinteger_t                                         buffer_size; 
     57        wi_uinteger_t                                         buffer_offset; 
    5858 
    5959        double                                                          connect_time; 
  • trackerd/trunk/trackerd/commands.c

    r4407 r4428  
    4848 
    4949        /* minimum number of arguments required */ 
    50         unsigned int                          args; 
     50        wi_uinteger_t                         args; 
    5151 
    5252        void                                            (*action)(wi_array_t *); 
     
    5656 
    5757static void                                             wt_parse_command(wi_string_t *); 
    58 static unsigned int                           wt_command_index(wi_string_t *); 
     58static wi_uinteger_t                  wt_command_index(wi_string_t *); 
    5959 
    6060static void                                             wt_cmd_categories(wi_array_t *); 
     
    8080 
    8181void wt_control_thread(wi_runtime_instance_t *argument) { 
    82         wi_pool_t               *pool; 
    83         wt_client_t             *client = (wt_client_t *) argument; 
    84         wi_string_t             *string; 
    85         unsigned int   i = 0
    86         int                            state
     82        wi_pool_t                      *pool; 
     83        wt_client_t                    *client = (wt_client_t *) argument; 
     84        wi_string_t                    *string; 
     85        wi_socket_state_t      state
     86        wi_uinteger_t          i = 0
    8787         
    8888        pool = wi_pool_init(wi_pool_alloc()); 
     
    9797                        do { 
    9898                                state = wi_socket_wait(client->socket, 0.1); 
    99                         } while(state == 0 && client->state <= WT_CLIENT_STATE_SAID_HELLO); 
     99                        } while(state == WI_SOCKET_TIMEOUT && client->state <= WT_CLIENT_STATE_SAID_HELLO); 
    100100 
    101101                        if(client->state > WT_CLIENT_STATE_SAID_HELLO) { 
     
    104104                        } 
    105105 
    106                         if(state < 0) { 
     106                        if(state == WI_SOCKET_ERROR) { 
    107107                                if(wi_error_code() == EINTR) { 
    108108                                        /* got a signal */ 
     
    149149        wi_string_t             *command; 
    150150        wi_array_t              *arguments; 
    151         unsigned int  index; 
     151        wi_uinteger_t index; 
    152152         
    153153        wi_parse_wired_command(buffer, &command, &arguments); 
     
    175175 
    176176 
    177 static unsigned int wt_command_index(wi_string_t *command) { 
     177static wi_uinteger_t wt_command_index(wi_string_t *command) { 
    178178        const char              *cstring; 
    179         unsigned int  i, min, max; 
     179        wi_uinteger_t i, min, max; 
    180180        int                             cmp; 
    181181 
     
    286286        wi_string_t                                     *hostname; 
    287287        wt_server_t                                     *server; 
    288         unsigned int                            bandwidth; 
    289288        wi_boolean_t                            failed = false, passed; 
     289        uint32_t                                        bandwidth; 
    290290 
    291291        url                     = wi_autorelease(wi_url_init_with_string(wi_url_alloc(), WI_ARRAY(arguments, 1))); 
  • trackerd/trunk/trackerd/servers.c

    r4407 r4428  
    130130        char                            magic[5]; 
    131131        wi_time_interval_t      interval, update; 
    132         unsigned int           version, count = 0; 
     132        wi_uinteger_t          count = 0; 
    133133        wi_boolean_t            loaded = false; 
     134        uint32_t                        version; 
    134135 
    135136        wi_lock_lock(wt_servers_lock); 
     
    172173 
    173174                        loaded = true; 
     175                        count++; 
    174176                } 
    175177        } 
  • trackerd/trunk/trackerd/settings.h

    r4407 r4428  
    4141        wi_string_t                                             *description; 
    4242        wi_array_t                                              *address; 
    43         unsigned int                                  port; 
     43        wi_uinteger_t                                 port; 
    4444 
    4545        uid_t                                                   user; 
     
    5050        wi_time_interval_t                              minupdatetime; 
    5151        wi_time_interval_t                              maxupdatetime; 
    52         unsigned int                                  minbandwidth; 
    53         unsigned int                                  maxbandwidth; 
     52        wi_uinteger_t                                 minbandwidth; 
     53        wi_uinteger_t                                 maxbandwidth; 
    5454        wi_boolean_t                                    lookup; 
    5555        wi_boolean_t                                    reverselookup; 
  • trackerd/trunk/trackerd/tracker.c

    r4407 r4428  
    209209        wi_string_t                     *ip; 
    210210        wt_client_t                     *client; 
    211         unsigned int          i = 0; 
     211        wi_uinteger_t         i = 0; 
    212212         
    213213        pool = wi_pool_init(wi_pool_alloc()); 
     
    266266        wt_server_t                     *server; 
    267267        char                            buffer[WI_SOCKET_BUFFER_SIZE]; 
    268         unsigned int          i = 0; 
    269         int                                   bytes; 
     268        wi_uinteger_t         i = 0; 
     269        wi_integer_t          bytes; 
    270270 
    271271        pool = wi_pool_init(wi_pool_alloc()); 
     
    353353#pragma mark - 
    354354 
    355 void wt_reply(unsigned int n, wi_string_t *fmt, ...) { 
     355void wt_reply(uint32_t n, wi_string_t *fmt, ...) { 
    356356        wt_client_t             *client = wt_client(); 
    357357        wi_string_t             *string;