Changeset 4634
- Timestamp:
- 02/15/07 00:09:58 (2 years ago)
- Files:
-
- wired/branches/p7/wired/files.c (modified) (3 diffs)
- wired/branches/p7/wired/server.c (modified) (1 diff)
- wired/branches/p7/wired/transfers.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wired/branches/p7/wired/files.c
r4568 r4634 456 456 } 457 457 458 if(wi_string_case_insensitive_compare(realfrom name, realtoname) == 0) {458 if(wi_string_case_insensitive_compare(realfrompath, realtopath) == 0) { 459 459 path = wi_file_temporary_path_with_template( 460 460 wi_string_with_format(WI_STR("%@/.%@.XXXXXXXX"), … … 493 493 494 494 wi_release(array); 495 496 result = true; 495 497 } else { 496 498 wi_log_warn(WI_STR("Could not rename %@ to %@: %m"), … … 523 525 } 524 526 } 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); 526 528 } 527 529 wired/branches/p7/wired/server.c
r4633 r4634 203 203 204 204 if(data) { 205 wi_release(wd_banner); 205 206 wd_banner = wi_retain(wi_data_base64(data)); 206 wi_release(data);207 207 } else { 208 208 wi_log_err(WI_STR("Could not open %@: %m"), wd_settings.banner); 209 209 } 210 211 wi_release(data); 210 212 } 211 213 } else { wired/branches/p7/wired/transfers.c
r4596 r4634 320 320 wi_uinteger_t position; 321 321 wi_uinteger_t i, count; 322 wi_uinteger_t total_downloads, total_uploads, client_downloads, client_uploads; 322 323 wi_boolean_t queue; 323 324 … … 325 326 wi_lock_lock(wd_transfers_status_lock); 326 327 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 327 333 clients = wi_set_init(wi_set_alloc()); 328 334 count = wi_array_count(wd_transfers); … … 351 357 352 358 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); 355 362 } 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); 358 366 } 359 367
