[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-commits] Changes to mldonkey/src/daemon/common/commonUploads.m
From: |
mldonkey-commits |
Subject: |
[Mldonkey-commits] Changes to mldonkey/src/daemon/common/commonUploads.ml |
Date: |
Sat, 19 Nov 2005 11:11:38 -0500 |
Index: mldonkey/src/daemon/common/commonUploads.ml
diff -u mldonkey/src/daemon/common/commonUploads.ml:1.36
mldonkey/src/daemon/common/commonUploads.ml:1.37
--- mldonkey/src/daemon/common/commonUploads.ml:1.36 Sat Nov 5 16:23:40 2005
+++ mldonkey/src/daemon/common/commonUploads.ml Sat Nov 19 16:11:37 2005
@@ -864,15 +864,18 @@
let csh = client_upload c in
let cdir = shared_dir csh in
let cprio = ref (shared_prio csh) in
+ let cfriend = ref (if !!friends_upload_slot then 1 else 0) in
(* if cdir <> "" then
lprintf "Testing cdir %s\n" cdir; *)
Intmap.iter (fun _ c ->
let sh = client_upload c in
- if shared_dir sh = cdir then decr cprio
+ if shared_dir sh = cdir then decr cprio;
+ if client_has_a_friend_slot c then decr cfriend;
) !CommonClient.uploaders;
(* if cdir <> "" then
- lprintf "Testing cprio %d\n" !cprio; *)
- if !cprio > 0 then begin
+ lprintf "Testing cprio %d cfriend %d\n" !cprio !cfriend; *)
+ if !cprio > 0 ||
+ (is_friend c && !cfriend > 0) then begin
remove_pending_slot c;
if client_is_connected c then begin
set_client_has_a_slot c true;