Changeset 4634

Show
Ignore:
Timestamp:
02/15/07 00:09:58 (2 years ago)
Author:
morris
Message:

Merge from trunk

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wired/branches/p7/wired/files.c

    r4568 r4634  
    456456        } 
    457457 
    458         if(wi_string_case_insensitive_compare(realfromname, realtoname) == 0) { 
     458        if(wi_string_case_insensitive_compare(realfrompath, realtopath) == 0) { 
    459459                path = wi_file_temporary_path_with_template( 
    460460                        wi_string_with_format(WI_STR("%@/.%@.XXXXXXXX"), 
     
    493493                         
    494494                        wi_release(array); 
     495                         
     496                        result = true; 
    495497                } else { 
    496498                        wi_log_warn(WI_STR("Could not rename %@ to %@: %m"), 
     
    523525                } 
    524526        } else { 
    525                 wi_log_warn(WI_STR("Could not copy %@: %m"), realfrompath); 
     527                wi_log_warn(WI_STR("Could not copy %@ to %@: %m"), realfrompath, realtopath); 
    526528        } 
    527529         
  • wired/branches/p7/wired/server.c

    r4633 r4634  
    203203                         
    204204                        if(data) { 
     205                                wi_release(wd_banner); 
    205206                                wd_banner = wi_retain(wi_data_base64(data)); 
    206                                 wi_release(data); 
    207207                        } else { 
    208208                                wi_log_err(WI_STR("Could not open %@: %m"), wd_settings.banner); 
    209209                        } 
     210 
     211                        wi_release(data); 
    210212                } 
    211213        } else { 
  • wired/branches/p7/wired/transfers.c

    r4596 r4634  
    320320        wi_uinteger_t           position; 
    321321        wi_uinteger_t           i, count; 
     322        wi_uinteger_t           total_downloads, total_uploads, client_downloads, client_uploads; 
    322323        wi_boolean_t            queue; 
    323324         
     
    325326        wi_lock_lock(wd_transfers_status_lock); 
    326327         
     328        total_downloads = wd_settings.totaldownloads; 
     329        client_downloads = wd_settings.clientdownloads; 
     330        total_uploads = wd_settings.totaluploads; 
     331        client_uploads = wd_settings.clientuploads; 
     332 
    327333        clients = wi_set_init(wi_set_alloc()); 
    328334        count = wi_array_count(wd_transfers); 
     
    351357                                 
    352358                                if(transfer->type == WD_TRANSFER_DOWNLOAD) { 
    353                                         queue = (wd_transfers_active_downloads >= wd_settings.totaldownloads || 
    354                                                          transfer->client->downloads >= wd_settings.clientdownloads); 
     359                                        queue = (total_downloads > 0 || client_downloads > 0) && 
     360                                                        (wd_transfers_active_downloads >= total_downloads || 
     361                                                         transfer->client->downloads >= client_downloads); 
    355362                                } else { 
    356                                         queue = (wd_transfers_active_uploads >= wd_settings.totaluploads || 
    357                                                          transfer->client->uploads >= wd_settings.clientuploads); 
     363                                        queue = (total_uploads > 0 || client_uploads > 0) && 
     364                                                        (wd_transfers_active_uploads >= total_uploads || 
     365                                                         transfer->client->uploads >= client_uploads); 
    358366                                } 
    359367