Home arrow Forums  
Friday, 10 September 2010  
Latest Forums
Welcome, Guest
Please Login or Register.    Lost Password?

Some problems I found
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Some problems I found
#51
Some problems I found 7 Months, 1 Week ago Karma: 0
First I'd like to thank you for your work. But there are some problems in the DNS code. Unfortunately I had no time to make a full review but here are some problems I found:

1. I was looking for some code for reseting a message and looking at the
Code:

const message& operator=(const message& p)
a noticed that the lists contained in the lval are never cleared prior to copying the lists from the rval to them. You practically add the rval to the lval.

2. Looking at the resolve class: from what I understand you send the query to all the dns servers but parse only the first response that arrives:

Code:


    // only decode if we haven't decoded already!
    if( responseMessage.result() != dns::message::no_result ) 



I believe it would be optimal to give-up only when:
-you received an answer;
-all the dns servers responded;
-a timeout occured.

I hope you'll find my feedback helpful. Please let me know if I can help you to make this code better.

Thank you and best regards,
Andrei
andrei1978
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#52
Re:Some problems I found 6 Months, 4 Weeks ago Karma: 0
Good catch on the operator= !

I've looked at this code so many times, that I never caught that one. I've made the appropriate change and have checked it in.

Looking at the other chunk of code.
softwareace
Administrator
Posts: 23
graph
User Online Now Click here to see the profile of this user
The administrator has disabled public write access.
Andreas Haberstroh
Ethernet (n) Device used to catch the Etherbunny
 
Go to topPage: 1
Moderators: softwareace
Top