[mythtv] Connecting to database via hostname

Bert Haverkamp bert at bertenselena.net
Sun Jan 21 17:12:06 UTC 2007


Hello

Just an update on my efforts to use a hostname to specify the backend and
database host.
I tried to rewrite my patch to use QDns. Hoever, this class is
asynchronious. It requires waiting for the resultsReady signal. I created a
little test program that does this flawlessly. However, when I implement
this in myhtsocket, I never get a result back.
I tried several different setups and implementations, but the result was the
same: no signal.

Now I don't know much about the threads problem of signals and slots. I was
wondering if this could be the problem. I created a QDns member called m_dns
in the Mythsocket class. Then I created the member function connectToHost
which sends m_dns to work and a SLOT tryConnecting that should be activated
once m_dns is finished. tryConnecting is never activated.

Can anyone see why this shouldn't work? or why this should work, but I am
just missing a very dumb bug;-)


Regards,

Bert


2007/1/8, Bert Haverkamp <bert at bertenselena.net>:
>
>
>
> 2007/1/8, Bert Haverkamp <bert at bertenselena.net>:
> >
> >
> >
> > 2007/1/8, Petr Stehlik <pstehlik at sophics.cz>:
> > >
> > >  Bert Haverkamp wrote:
> > > > Furthermore: I am aware that providing the backend with a stable IP
> > > address
> > > > via DHCP is also a solution. But I don't think changing the network
> > > in
> > > > order to install a mythbackend is a very elegant solution:-)
> > >
> > > How about making the IP stable by setting up the DHCP to assign
> > > certain
> > > IP based on the MAC address (HW address) of the myth backend's network
> > > card? That's how I do that.
> > >
> > > I know, this is the setup most treads recommend... But I would like to
> > > make mythtv a bit more resilient though. I want to sell a mythtv settop box
> > > that can be connected by each-and-everyone.  Many networks these days are
> > > controlled by a  (wireless) router that does the dhcp+dynamic dns
> > > automatically. I have such a setup, and would like to be able use it.
> >
> >
> >
> > Alternatively, the backends should be able to figure out his own IP
> > address and enter this in the database, instead of entering it manually. The
> > frontend should only have to deal with the database server address (this
> > info sits in ~/.mythtv/mysql.txt.)  This would be even better, as it doesn't
> > require DNS now I think of it!
> >
> > Regards,
> >
> > Bert
> > www.oatfield.nl
> >
>
> Correction.. Of course we still need  DNS or to enter an IP addres for
> finding the databaseserver, but at least it gets rid of the configuration
> optionfor the host IP address.
>
> Regards,
>
> Bert
>
>
>


-- 

-----------------------------------------------
Bert en Selena
www.bertenselena.net
-----------------------------------------------
Only two things are infinite:
human stupidity and the universe,
and I'm not sure about the latter.
   Albert Einstein
-----------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-dev/attachments/20070121/65463e00/attachment.htm 


More information about the mythtv-dev mailing list