Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Dev

Re: [mythtv-commits] mythtv commit: r14964 - in trunk/mythtv by nigel

 

 

MythTV dev RSS feed   Index | Next | Previous | View Threaded


danielk at cuymedia

Nov 28, 2007, 5:02 PM

Post #1 of 2 (476 views)
Permalink
Re: [mythtv-commits] mythtv commit: r14964 - in trunk/mythtv by nigel

On Tue, 2007-11-27 at 00:46 +0000, mythtv [at] cvs wrote:
> Author: nigel
> Date: 2007-11-27 00:46:46 +0000 (Tue, 27 Nov 2007)
> New Revision: 14964
> Changeset: http://cvs.mythtv.org/trac/changeset/14964
>
> Removed:
>
> trunk/mythtv/programs/mythfrontend/masterselection.cpp
> trunk/mythtv/programs/mythfrontend/masterselection.h
>
> Modified:
>
> trunk/mythtv/libs/libmyth/libmyth.pro
> trunk/mythtv/libs/libmyth/mythcontext.cpp
> trunk/mythtv/libs/libmyth/mythcontext.h
> trunk/mythtv/programs/mythfrontend/main.cpp
> trunk/mythtv/programs/mythfrontend/mediarenderer.cpp
> trunk/mythtv/programs/mythfrontend/mythfrontend.pro
>
> Log:
>
> New, slightly improved, UPnP autodiscovery. See #4075.
> This should allow most simple setups (either everything on the one machine,
> or one UPnP enabled backend on the network) to just work automaticaly!
> For more complex situations, you have to select a backend and enter a PIN.
> These functions are now more remote friendly, although PIN entry is still hard
>

Nigel, this causes my backend not to use the database on the localhost
but instead connect to another database on the network. It is defined
in '/home/mythtv/.mythtv/mysql.txt' as DBHostName=localhost. It looks
like it now thinks it is a slave backend to the production mythtv box.

It also causes mythtv-setup to connect to the same wrong DB. I did a
"delete all cards" on the production machine before I realized what
was going on :[ (thankfully not to hard to fix, but still a shock.)
mythtv-setup should only ever connect to the database for the local
backend, so I guess it just got caught up in the same auto-discovery
stuff as the backend.

I didn't get as far as running mythtv-frontend before reverting
the changeset locally, but I always run that with "-d", otherwise
autodiscovery connects me to some remote mythtv backend, but I
presume it wouldn't be affected because "-d" makes it ignore
the whole UPnP stuff.

-- Daniel

_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


nigel at ind

Nov 28, 2007, 5:28 PM

Post #2 of 2 (438 views)
Permalink
Re: [mythtv-commits] mythtv commit: r14964 - in trunk/mythtv by nigel [In reply to]

> Nigel, this causes my backend not to use the database on the localhost
> but instead connect to another database on the network.

Hmmm. Unless there is a config.xml to tell it otherwise,
the code is meant to try localhost first. Honest!

...
bool MythContextPrivate::FindDatabase(const bool prompt, const bool
noPrompt)
...
// 1. Load either mysql.txt, or use sensible "localhost" defaults:
LoadDatabaseSettings();


// 2. If the user isn't forcing up the chooser UI, look for a
default
// backend in config.xml, then test DB settings we've got so
far:
if (!manualSelect)
{
// config.xml may contain a backend host UUID and PIN.
// If so, try to AutoDiscover UPnP server, and use its DB
settings:

if (DefaultUPnP(failure)) // Probably a valid
backend,
autoSelect = manualSelect = false; // so disable any
further UPnP
else
VERBOSE(VB_IMPORTANT, failure);

failure = TestDBconnection();
if (failure.isEmpty())
goto DBfound;



That TestDBconnection() should have used the localhost
settings in mysql.txt, and given you the right DB?



I don't suppose you still have the program output?




...
> I presume it wouldn't be affected because "-d" makes it ignore
> the whole UPnP stuff.

At the moment, -d only ignores the backend chooser.
UPnP auto discovery will still try to connect.

--
Nigel Pearson, nigel [at] ind| 4 8
Telstra Net. Eng., Sydney, Australia | 15 16
Office: 9202 3900 Fax: 9261 3912 | 23 42
Mobile: 0408 664435 Home: 9792 6998 | Lost


_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

MythTV dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.