Changeset 3820

Show
Ignore:
Timestamp:
02/27/06 21:20:15 (3 years ago)
Author:
morris
Message:

Sync

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wire/trunk/wire/client.c

    r3802 r3820  
    304304         
    305305        string = wi_string_by_converting_encoding(buffer, wr_server_string_encoding, wr_client_string_encoding); 
     306 
    306307        wi_parse_wired_message(string, &message, &arguments); 
    307         wi_release(string); 
    308308 
    309309        switch(message) { 
     
    497497                 
    498498                password = wi_string_length(wr_password) == 0 ? NULL : wi_string_sha1(wr_password); 
     499 
    499500                wr_send_command(WI_STR("PASS %#@"), password); 
    500                 wi_release(password); 
    501501                 
    502502                wr_send_command(WI_STR("WHO %u"), 1); 
     
    778778                                                name, transferred, size, speed); 
    779779                                } 
    780                                  
    781                                 wi_release(name); 
    782780                        } 
    783                          
    784                         wi_release(array); 
    785781                } 
    786                  
    787                 wi_release(transfers); 
    788782        } 
    789783} 
     
    984978static void wr_msg_402(wi_array_t *arguments) { 
    985979        wi_date_t                       *date; 
    986         wi_string_t                     *path, *name, *kind, *string; 
     980        wi_string_t                     *path, *kind, *string; 
    987981        wr_transfer_t           *transfer; 
    988982        wi_file_offset_t        size; 
     
    994988 
    995989        if(wr_stat_state == WR_STAT_FILE) { 
    996                 name = wi_string_last_path_component(path); 
    997                 wr_printf_prefix(WI_STR("File info for %@:"), name); 
    998                 wi_release(name); 
     990                wr_printf_prefix(WI_STR("File info for %@:"), wi_string_last_path_component(path)); 
    999991                 
    1000992                wr_printf_block(WI_STR("Path:      %@"), path); 
     
    10781070        wr_file_t               *file; 
    10791071 
    1080         file = wr_file_init(wr_file_alloc()); 
    1081          
    1082         file->type = wi_string_unsigned_int_value(WI_ARRAY(arguments, 1)); 
    1083         file->size = wi_string_unsigned_int_value(WI_ARRAY(arguments, 2)); 
    1084         file->path = wi_retain(WI_ARRAY(arguments, 0)); 
    1085         file->name = wi_string_last_path_component(file->path); 
     1072        file            = wr_file_init(wr_file_alloc()); 
     1073        file->type      = wi_string_unsigned_int_value(WI_ARRAY(arguments, 1)); 
     1074        file->size      = wi_string_unsigned_int_value(WI_ARRAY(arguments, 2)); 
     1075        file->path      = wi_retain(WI_ARRAY(arguments, 0)); 
     1076        file->name      = wi_retain(wi_string_last_path_component(file->path)); 
    10861077 
    10871078        wi_list_append_data(wr_files, file); 
     
    11161107        wr_file_t               *file; 
    11171108 
    1118         file = wr_file_init(wr_file_alloc()); 
    1119          
    1120         file->type = wi_string_unsigned_int_value(WI_ARRAY(arguments, 1)); 
    1121         file->size = wi_string_unsigned_int_value(WI_ARRAY(arguments, 2)); 
    1122         file->path = wi_retain(WI_ARRAY(arguments, 0)); 
    1123         file->name = wi_string_last_path_component(file->path); 
     1109        file            = wr_file_init(wr_file_alloc()); 
     1110        file->type      = wi_string_unsigned_int_value(WI_ARRAY(arguments, 1)); 
     1111        file->size      = wi_string_unsigned_int_value(WI_ARRAY(arguments, 2)); 
     1112        file->path      = wi_retain(WI_ARRAY(arguments, 0)); 
     1113        file->name      = wi_retain(wi_string_last_path_component(file->path)); 
    11241114 
    11251115        wi_list_append_data(wr_files, file); 
  • wire/trunk/wire/files.c

    r3819 r3820  
    8585        wi_string_t                             *path, *full_path, *name; 
    8686        wr_file_t                               *file; 
    87         char                                    *cname, *match = NULL
     87        char                                    *cname
    8888        wi_boolean_t                    root; 
    8989         
     
    9595                wi_release(directory_path); 
    9696                 
    97                 directory_path = wi_string_by_deleting_last_path_component(path); 
    98                 full_path = wr_files_full_path(directory_path); 
     97                directory_path = wi_retain(wi_string_by_deleting_last_path_component(path)); 
     98                full_path              = wr_files_full_path(directory_path); 
    9999 
    100100                wr_clear_files(); 
     
    119119 
    120120                        full_path = wi_string_by_appending_path_component(directory_path, file->name); 
    121                         match = strdup(wi_string_cstring(full_path)); 
    122                         wi_release(full_path); 
    123                          
    124                         break; 
     121 
     122                        return strdup(wi_string_cstring(full_path)); 
    125123                } 
    126124        } 
    127125         
    128         wi_release(name); 
    129          
    130         return match; 
     126        return NULL; 
    131127} 
    132128 
     
    141137                fullpath = wi_autorelease(wi_copy(path)); 
    142138        else 
    143                 fullpath = wi_autorelease(wi_string_by_appending_path_component(wr_files_cwd, path)); 
     139                fullpath = wi_string_by_appending_path_component(wr_files_cwd, path); 
    144140 
    145141        wi_string_normalize_path(fullpath); 
  • wire/trunk/wire/main.c

    r3795 r3820  
    146146        else 
    147147                wr_printf_prefix(WI_STR("%@: %m"), path); 
    148          
    149         wi_release(path); 
    150148 
    151149        /* read specified bookmark */ 
    152150        if(*argv) { 
    153                 component = wi_string_with_cstring(*argv); 
    154                 path = wi_string_by_appending_path_component(wirepath, component); 
    155                 file = wi_file_for_reading(path); 
     151                component      = wi_string_with_cstring(*argv); 
     152                path           = wi_string_by_appending_path_component(wirepath, component); 
     153                file           = wi_file_for_reading(path); 
    156154 
    157155                if(file) 
     
    159157                else 
    160158                        wr_printf_prefix(WI_STR("%@: %m"), path); 
    161                  
    162                 wi_release(path); 
    163         } 
    164          
    165         wi_release(wirepath); 
     159        } 
     160         
    166161        wi_release(pool); 
    167162         
  • wire/trunk/wire/transfers.c

    r3795 r3820  
    150150        transfer = wi_autorelease(wr_transfer_init_download(wr_transfer_alloc())); 
    151151        transfer->path = wi_retain(wr_files_full_path(path)); 
    152         transfer->name = wi_string_last_path_component(transfer->path); 
     152        transfer->name = wi_retain(wi_string_last_path_component(transfer->path)); 
    153153        transfer->local_path = wi_retain(wi_user_home()); 
    154154        wi_string_append_path_component(transfer->local_path, transfer->name); 
     
    195195         
    196196        transfer = wi_autorelease(wr_transfer_init_upload(wr_transfer_alloc())); 
    197         transfer->local_path = wi_string_by_expanding_tilde_in_path(path); 
     197        transfer->local_path = wi_retain(wi_string_by_expanding_tilde_in_path(path)); 
    198198        wi_string_normalize_path(transfer->local_path); 
    199         transfer->name = wi_string_last_path_component(transfer->local_path); 
     199        transfer->name = wi_retain(wi_string_last_path_component(transfer->local_path)); 
    200200        transfer->path = wi_retain(wr_files_full_path(transfer->name)); 
    201201         
     
    294294 
    295295                                path = wi_string_by_deleting_path_extension(transfer->local_path); 
     296                                 
    296297                                wi_file_rename(transfer->local_path, path); 
    297                                 wi_release(path); 
    298298                        } else { 
    299299                                wr_printf_prefix(WI_STR("Transfer of \"%@\" stopped"), 
  • wire/trunk/wire/windows.c

    r3790 r3820  
    375375                wr_wprintf(window, WI_STR("   %@"), WI_ARRAY(array, i)); 
    376376 
    377         wi_release(array); 
    378377        wi_release(string); 
    379378} 
     
    433432                WR_END_COLOR, 
    434433                chat); 
    435          
    436         wi_release(prefix); 
    437434} 
    438435 
     
    470467                color ? WR_END_COLOR : "", 
    471468                chat); 
    472          
    473         wi_release(prefix); 
    474469} 
    475470