[mythtv-users] Re: Why only numeric IP addresses work?
Scott Mazur
mythlists at littlefish.ca
Wed Oct 13 20:39:39 UTC 2004
On Wed, 13 Oct 2004 11:13:32 -0400, Isaac Richards wrote
> On Wednesday 13 October 2004 10:40 am, Grant Edwards wrote:
> > On Wed, Oct 13, 2004 at 08:51:42AM -0500, Grant Edwards wrote:
> > > and setting up an inet_addr stuct, all that's required is to
> > > rip out a couple dozen lines of code and replace it with a
> > > single call to gethostbyname(). That illustrates _my_ point:
> > > why would anybody go to all the extra work required to
> > > explicitly _not_allow_ hostnames?
> >
> > I browsed around the source code a bit, and in some places
> > gethostbyname() is used (so the normal resover libraries will
> > work). In other places, some Qt "host address" object is used.
>
> Wait a minute - someone actually _looked_ at the source code?
> That's crazy talk.
>
> > >From what I can tell from the Qt documentation, that object can
> >
> > only understand dotted-quad notation. Apparently, the Qt guys
> > decided to write their own address parser rather than doing the
> > right thing and just calling gethostbyname(). Not only did
> > they reinvent the wheel, they apparently made it sqaure...
>
> Because just using gethostbyname blocks, and you don't want that in
> a GUI app. There is a non-blocking Qt class to handle name lookups.
But if the name lookup only occurs when you start the frontend (or backend),
then a blocking call isn't much of a problem is it? I mean you've already
got plenty of blocking activity (prescaling images, etc) going on anyway at
this point.
It would be nice if the frontend setup options included a configuration
paramater for setting the backend server. Unless I've missed something, the
mysql.txt file does nothing to set the backend server location, forcing you to
use mythtvsetup to change it, which requires a full backend install, whether
you need it or not. Or maybe I haven't caught the gist of it.
Scott
--
Nothing goes to waste when Little Fish are near!
(http://www.littlefish.ca)
More information about the mythtv-users
mailing list