[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] gethostbyname() fails on the FireBee
Hello, Ole.
I answer to the list, as other people will be interested.
On 31/08/2014 00:29, Ole wrote :
Is your timeon the firebee set correctly? I once noticed the problem,
too. But it only occured when the time settings where incorrect (the was
also some firebee cpx setting which influenced such time/date things, if
i remeber correctly...).
Yes, the "date" command outputs the correct date/time.
I had not powered on my FireBee for a long time, so yesterday the date was
shifted by a few days (I suspect a bug in day/month calculation in the PIC).
Yesterday, I set the date correctly and I powered off. Now the date/time is
always good, even on cold boot.
Ping works correctly at my firebee, so it's some environment setting
which causes the problem.
I have just noticed that the old ping command taken from EasyMiNT works fine
on my FireBee, with the exact same setup (FireTOS + FreeMiNT 1.19)!
While the freshly compiled ping fails on gethostbyname().
So it must be a regression in the MiNTLib's gethostbyname() (or compiler),
since the kernel and FEC driver are strictly the same.
In the MiNTLib, I tracked gethostbyname() down to the res_send() function:
http://sparemint.atariforge.net/cgi-bin/cvsweb/mintlib/socket/res_send.c?rev=1.6&content-type=text/x-cvsweb-markup
At line 340, the function waits for a reply using select().
I believe something is wrong there, so the function timeouts immediately and
jumps to next try.
Alan, are you familiar with that code?
PS: The fact it works fine with strace should be a clue.
--
Vincent Rivière