Discovery Services code update

After you have edited the source code, post your patch here.
Forum rules
Home | Wiki | Rules

Discovery Services code update

Postby old_death » 09 Jul 2011 04:59

Attachments
Discovery Services code update.7z
Based on r9045
(20.06 KiB) Downloaded 205 times
User avatar
old_death
 
Posts: 1950
Joined: 13 Jun 2009 16:19

Re: Discovery Services code update

Postby raspopov » 10 Jul 2011 05:46

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)
User avatar
raspopov
Project Admin
 
Posts: 945
Joined: 13 Jun 2009 12:30

Re: Discovery Services code update

Postby old_death » 10 Jul 2011 21:24

User avatar
old_death
 
Posts: 1950
Joined: 13 Jun 2009 16:19

Re: Discovery Services code update

Postby old_death » 11 Jul 2011 20:02

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().
User avatar
old_death
 
Posts: 1950
Joined: 13 Jun 2009 16:19

Re: Discovery Services code update

Postby old_death » 11 Jul 2011 20:49

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.
Attachments
Discovery Services part2.7z
Migrating from BOOL to bool.
(15.74 KiB) Downloaded 213 times
User avatar
old_death
 
Posts: 1950
Joined: 13 Jun 2009 16:19

Re: Discovery Services code update

Postby old_death » 11 Jul 2011 21:26

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().
Attachments
Discovery Services part3.7z
(15.88 KiB) Downloaded 199 times
User avatar
old_death
 
Posts: 1950
Joined: 13 Jun 2009 16:19

Re: Discovery Services code update

Postby old_death » 11 Jul 2011 23:06

This is the final part of my commit. It includes basically the fix for ticket #99 of the bug tracker:
Attachments
Discovery Services part4.7z
(15.92 KiB) Downloaded 212 times
User avatar
old_death
 
Posts: 1950
Joined: 13 Jun 2009 16:19

Re: Discovery Services code update

Postby raspopov » 12 Jul 2011 03:40

User avatar
raspopov
Project Admin
 
Posts: 945
Joined: 13 Jun 2009 12:30

Re: Discovery Services code update

Postby ailurophobe » 12 Jul 2011 11:14

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.
ailurophobe
 
Posts: 709
Joined: 11 Nov 2009 05:25

Re: Discovery Services code update

Postby old_death » 12 Jul 2011 23:00

User avatar
old_death
 
Posts: 1950
Joined: 13 Jun 2009 16:19

Re: Discovery Services code update

Postby ailurophobe » 12 Jul 2011 23:55

ailurophobe
 
Posts: 709
Joined: 11 Nov 2009 05:25

Re: Discovery Services code update

Postby old_death » 13 Jul 2011 14:14

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
User avatar
old_death
 
Posts: 1950
Joined: 13 Jun 2009 16:19

Re: Discovery Services code update

Postby old_death » 15 Jul 2011 20:18

Ryo-oh-ki, this fixes the previously discussed issues:
Discovery Services code update 2011-07-15.7z
(15.66 KiB) Downloaded 247 times


I hope you have no objections to commit this anymore, do you?
User avatar
old_death
 
Posts: 1950
Joined: 13 Jun 2009 16:19

Re: Discovery Services code update

Postby fifi9491 » 06 Nov 2011 08:26

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
fifi9491
 
Posts: 5
Joined: 02 Apr 2011 08:48

Re: Discovery Services code update

Postby ailurophobe » 06 Nov 2011 21:36

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...
ailurophobe
 
Posts: 709
Joined: 11 Nov 2009 05:25

Re: Discovery Services code update

Postby old_death » 12 Aug 2013 22:47

User avatar
old_death
 
Posts: 1950
Joined: 13 Jun 2009 16:19


Return to Code Submission

Who is online

Users browsing this forum: No registered users and 1 guest

cron