Page 1 of 1

Discovery Services code update

PostPosted: 09 Jul 2011 04:59
by old_death

Re: Discovery Services code update

PostPosted: 10 Jul 2011 05:46
by raspopov
This code changes are dangerous. For example you changed all "BOOL" to "bool", its useless and broke serialization compatibility with previous version (and without reason changed design of Serialization functions). You replaced MFC "CList" (list-style) with different class "std::set" (array-style), i see no point doing this. So many unneeded changes in code masks real ones and difficult its reviewing.

(I prefer several tiny patches over one massive even in few source files)

Re: Discovery Services code update

PostPosted: 10 Jul 2011 21:24
by old_death

Re: Discovery Services code update

PostPosted: 11 Jul 2011 20:02
by old_death
OK, there you go with part 1:
Discovery Services part1.7z
(15.62 KiB) Downloaded 220 times


This includes the migration from Clist to std::set, as well as the redesign of the CDiscoveryService::serialize() method necessary to get rid of the unnecessary use of auto_ptr used within CDiscoveryServices::serialize().

Re: Discovery Services code update

PostPosted: 11 Jul 2011 20:49
by old_death
This second part is about moving from BOOL to bool for most methods and variables. I have verified that all BOOLs that have been changed into bools have been only used as true/false indicators and nothing has been broken.

Plz verify and commit.

Re: Discovery Services code update

PostPosted: 11 Jul 2011 21:26
by old_death
This is the third part. It contains internal method optimizations. For example, it makes the GetByAddress find URLs that have extra slashes at the end and it reduces the workload of MergeURLs() by ~40-50% by cutting down the number of iterations in some loops. Also, it includes some cleanups and converts some monstrosity of an if/else statement into a switch/case statement. And finally, it fixes a memory leak in MergeURLs().

Re: Discovery Services code update

PostPosted: 11 Jul 2011 23:06
by old_death
This is the final part of my commit. It includes basically the fix for ticket #99 of the bug tracker:

Re: Discovery Services code update

PostPosted: 12 Jul 2011 03:40
by raspopov

Re: Discovery Services code update

PostPosted: 12 Jul 2011 11:14
by ailurophobe
1. Honestly, I see no point to std::set in Discovery either... at this time. But... OD does say he intends further improvements and std::set is generally better and more flexible than CList. It is pretty easy to imagine updates that would use find and benefit from this change. So unless it actually breaks something, please give this change.

2. There are two opinions about whether auto_ptr is a good thing to use or something to be avoided. Both are absolutely true. It depends on the coding style of the developers. With ryo being the current primary developer... IMHO auto_ptr should stay.

Just my one cents as an interfering busybody.

Re: Discovery Services code update

PostPosted: 12 Jul 2011 23:00
by old_death

Re: Discovery Services code update

PostPosted: 12 Jul 2011 23:55
by ailurophobe

Re: Discovery Services code update

PostPosted: 13 Jul 2011 14:14
by old_death
Lol, I have seen it included literally hundreds of times in various Shareaza source files, however I have never checked its actual code...

I'll post some updated code on Thursday next week (probably), as I don't have much time until then.


mfg,
Old

Re: Discovery Services code update

PostPosted: 15 Jul 2011 20:18
by old_death
Ryo-oh-ki, this fixes the previously discussed issues:
Discovery Services code update 2011-07-15.7z
(15.66 KiB) Downloaded 248 times


I hope you have no objections to commit this anymore, do you?

Re: Discovery Services code update

PostPosted: 06 Nov 2011 08:26
by fifi9491
Hello to All

Has this Update any thing to do with my Files downloading but are not playing because of me not having the necessary codecs to play them? It is so since I downloaded the Spamfilter witch got rid of it

Please help
Fifi

Re: Discovery Services code update

PostPosted: 06 Nov 2011 21:36
by ailurophobe
No, this update or Shareaza in general does not have anything to do with you not having some specific codec the files need installed. Shareaza does not include the codecs or in general have anything to do with them. The wiki page for this seems to be out of date, so I'll just link to the codec pack that I use. It might not be the best one for you, or even work for you depending on your operating system, but it will probably fix your problem and the page has lots of info about what to do if it doesn't work...

Re: Discovery Services code update

PostPosted: 12 Aug 2013 22:47
by old_death