folpindo / arduino

Automatically exported from code.google.com/p/arduino
0 stars 0 forks source link

DNS library getHostByName doesn't work #1056

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi I have a problem with the default dns library.

I found that the problem is in a check that the dns library does to control if 
the dns server address is not null (0.0.0.0). I commented the line and executed 
my code without this check and the library worked well.

The code that I executed is the file test_dns.ino attached.

Expected output (seen with my patch):
My IP address: 10.0.1.119
64.131.82.241
64.131.82.241
64.131.82.241
64.131.82.241

Real output (without patch):
My IP address: 10.0.1.119
0.0.0.0
0.0.0.0
0.0.0.0
0.0.0.0

I'm using Arduino 1.0.1 on Debian Sid with an Arduino Uno board.

I attached the patch that I used.

I know that this isn't the right way to correct this error but I'm waiting 
before changing more code. In fact the problem is related to the == operator of 
the IPAddress class but first of all I want to check if it is a common problem 
or not.

Original issue reported on code.google.com by kapo....@gmail.com on 30 Sep 2012 at 6:39

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for looking into this and providing a test case!  If the problem is in 
the IPAddress operator==(), can you submit a patch that fixes that?  Commenting 
out the check altogether doesn't seem like a great option, even as a temporary 
fix.

Original comment by dmel...@gmail.com on 1 Oct 2012 at 2:53

GoogleCodeExporter commented 9 years ago
First of all I want to know where is the problem. 
I asked http://arduino.cc/forum/index.php/topic,125140.0.html and it seems that 
in Ubuntu 11.10 there isn't any problem.

Original comment by kapo....@gmail.com on 1 Oct 2012 at 2:59

GoogleCodeExporter commented 9 years ago
Ok the problem seems to be related to the packaged version of the IDE for 
Debian and for Ubuntu too.

Maybe it is better to open a bug report in my distribution bug tracker.

Original comment by kapo....@gmail.com on 1 Oct 2012 at 3:24