[Xastir] failure to use gpsd

Curt, WE7U curt.we7u at gmail.com
Thu Jun 17 17:42:01 EDT 2010


On Thu, 17 Jun 2010, Curt, WE7U wrote:

> Not necessarily true.  There's no guarantee that we were smart
> enough to bypass the hostname lookup if there appears to be a valid
> IP address in the hostname field.  Yea, interface.c in net_init()
> does this every time:
>
>    (void)host_lookup(port_data[port].device_host_name,
>        ip_addrs,
>        sizeof(ip_addrs),
>        13);
>
> Sorry about thinking that Xastir would avoid the hostname lookup in
> that case.
>
> So...  We could smarten up the code there to test whether it looks
> like a valid IP address and bypass the host lookup.  I have other
> pressing matters to attend to though, like re-writing the GPSD
> interface code.
>
> If you (or anyone else) care to write a patch to do the above, send
> it along and I'll test it out/commit it.

It looks like running the hostname through inet_aton() would tell us
if it was a valid address.  Should be a simple patch but I'm not
going to look at it right now.  Anyone else?

-- 
Curt, WE7U.                         <http://www.eskimo.com/~archer>
    APRS:  Where it's at!                    <http://www.xastir.org>
   Lotto:  A tax on people who are bad at math. - unknown
Windows:  Microsoft's tax on computer illiterates. - WE7U.
The world DOES revolve around me:  I picked the coordinate system!"



More information about the Xastir mailing list