IPB

Welcome Guest ( Log In | Register )

> Board Rules!

Read this before you post!

 
Reply to this topicStart new topic
gethostbyname problem
jpprade
post Jan 18 2009, 08:48 PM
Post #1


Newbie Poster
Group Icon

Group: Members
Posts: 2
Joined: 18-January 09
Member No.: 30464



Hello,

I am using to last version of dswifi and I have a problem with the httpget example.

it only works 50% of time .

I figured out that the IP adresse return is 0.0.0.0.

CODE
struct hostent * myhost = gethostbyname( url );
struct in_addr todisp;
todisp.s_addr = (unsigned long *)(myhost->h_addr_list[0]);
iprintf("Connecting to  : %s\n", inet_ntoa(todisp) );


And it show me 0.0.0.0, some other time it works...
Does it depends on the dns server of my provider ?

(I can manage to get the IP with a retry mechanism)


By the way I am looking for a way to test in an emulator but my computer got no wifi, just a lan link...
Is this possible ?

thanks for this great library !
Go to the top of the page
 
+Quote Post
jpprade
post Feb 2 2009, 09:08 PM
Post #2


Newbie Poster
Group Icon

Group: Members
Posts: 2
Joined: 18-January 09
Member No.: 30464



I tried different emulator and it always freeze during the call to Wifi_InitDefault

Is there anyway to test but with real device ?

thanks

This post has been edited by jpprade: Feb 2 2009, 09:22 PM
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st November 2009 - 04:32 AM