Sharesize conflict

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

Locked
ExpertDUKE
Posts: 3
Joined: 2004-04-26 10:27

Sharesize conflict

Post by ExpertDUKE » 2004-04-26 10:36

hello everyone,
i have a problem with DC++,
I compiled the code myself... and I have problem with the share size that is reported in my DcLst.
I searched for the functions that do that and all i found is GetSize in File.h.

Can anyone help me???
Know

Todi
Forum Moderator
Posts: 699
Joined: 2003-03-04 12:16
Contact:

Post by Todi » 2004-04-26 10:52

What is the problem exactly? Can't get it to report any number you want...? :roll:

ExpertDUKE
Posts: 3
Joined: 2004-04-26 10:27

Post by ExpertDUKE » 2004-04-26 10:55

yes...can u help me fix it up?
im really desperate...
Know

Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 09:32
Contact:

Post by Sedulus » 2004-04-26 11:32

try this one in windows/DirectoryListingFrm.cpp

Code: Select all

                string tmp2 = STRING(SIZE) + ": " + Util::formatBytes(total);
;))
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

Todi
Forum Moderator
Posts: 699
Joined: 2003-03-04 12:16
Contact:

Post by Todi » 2004-04-26 13:06

Perhaps something like

Code: Select all

do
{
sharesize += 1;
}
while(coder=lame);
Could work too? I don't do much C++ thou... ;)

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2004-04-26 14:24

I think sedulus code is better, with your code you'll have to retrive the total saresize somewhere to know where to stop ;)

ExpertDUKE
Posts: 3
Joined: 2004-04-26 10:27

Some problems with code....

Post by ExpertDUKE » 2004-04-26 14:32

a. there is an error with the while condition (coder=lame) ? (coder==lame???) :(

b. another error: coder==lame ---> coder == "lame" :?:

c. this condition is always FALSE so the while expression never get to be done... :lol:

d. If the only thing I wanted was to change the reported SHARESIZE, 8)
I woudn't need any of your help (Because getSize() will do that... (File.h). But because my problem is :

Code: Select all

 (DcLst share size != ShareSize) && !(I wrote DC++) 
Then I need the help of some of the guys that have no life... and that computer is their only friend and they spend their time writing DC++(that is really cool, I hope in some year I will reach this level... :) )

So please help me find my feet on the code please. :?:
Know

Todi
Forum Moderator
Posts: 699
Joined: 2003-03-04 12:16
Contact:

Post by Todi » 2004-04-26 14:55

Oh right.. like i said, i don't do much c++ =) how about

Code: Select all

int fakesharesize
int coder* = &between_keyboard_and_chair

do 
{ 
fakesharesize += 1; 
} 
while(coder=="lame");
? :roll:

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Re: Some problems with code....

Post by GargoyleMT » 2004-04-26 22:02

ExpertDUKE wrote:Then I need the help of some of the guys that have no life... and that computer is their only friend and they spend their time writing DC++(that is really cool, I hope in some year I will reach this level...
Finished jerking off yet?

Now, explain what you're trying to do and where you get stuck.

The file list size can be out of sync with DC++'s reported share size for a couple reasons. But the share in the list is always bigger.

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2004-04-27 00:32

You can't compare an integere with an stering Todi, so while(coder=="lame") is oncorrrect ;)

Locked