Anonymous | Login | Signup for a new account | 2024-11-01 09:32 CET |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0000494 | aMule | Sharedfiles | public | 2005-06-29 14:16 | 2005-07-05 12:29 | ||||
Reporter | eyalzo | ||||||||
Assigned To | Xaignar | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | 2.0.3 | ||||||||
Target Version | Fixed in Version | SVN | |||||||
Summary | 0000494: Clients with score zero stay in queue | ||||||||
Description | Some clients in upload queue might get score of zero, and stay there (almost) forever. It makes all the new uploaders to get into queue, even when there are some empty slots waiting for them. | ||||||||
Additional Information | The problem is that direct-add is used only when upload-queue is empty. But it won't be empty if these guys won't get their slot or kicked-out. It can be solved in one of several ways. I decided to give them a slot. The easiest way is to change UploadQueue.cpp, AddUpNextClient(), the line: if ( cur_score > bestscore){ To: if ( cur_score >= bestscore){ You can also use signed-int for bestscore, and start with -1. | ||||||||
Tags | No tags attached. | ||||||||
Fixed in Revision | |||||||||
Operating System | |||||||||
Attached Files | |||||||||
Notes | |
(0001122) Xaignar (manager) 2005-07-05 12:29 |
Thanks you for the report. The following fix has been applied: =================================================================== --- src/UploadQueue.cpp (revision 4715) +++ src/UploadQueue.cpp (working copy) @@ -80,11 +80,13 @@ m_lastCalculatedDataRateTick = 0; } -void CUploadQueue::AddUpNextClient(CUpDownClient* directadd){ + +void CUploadQueue::AddUpNextClient(CUpDownClient* directadd) +{ POSITION toadd = 0; POSITION toaddlow = 0; - uint32 bestscore = 0; - uint32 bestlowscore = 0; + sint64 bestscore = -1; + sint64 bestlowscore = -1; CUpDownClient* newclient; // select next client or use given client @@ -113,8 +115,9 @@ continue; } // finished clearing - uint32 cur_score = cur_client->GetScore(true); - if ( cur_score > bestscore){ + + sint64 cur_score = cur_client->GetScore(true); + if (cur_score > bestscore) { bestscore = cur_score; toadd = pos2; } else { =================================================================== Cheers, Xaignar |
Issue History | |||
Date Modified | Username | Field | Change |
2005-06-29 14:16 | eyalzo | New Issue | |
2005-07-05 03:28 | Xaignar | Status | new => acknowledged |
2005-07-05 12:29 | Xaignar | Status | acknowledged => resolved |
2005-07-05 12:29 | Xaignar | Fixed in Version | => CVS |
2005-07-05 12:29 | Xaignar | Resolution | open => fixed |
2005-07-05 12:29 | Xaignar | Assigned To | => Xaignar |
2005-07-05 12:29 | Xaignar | Note Added: 0001122 |
Copyright © 2000 - 2024 MantisBT Team |