[mythtv] Ticket #4109: LocalHostName should not default to "my-unique-identifier-goes-here"
Janne Grunau
janne-mythtv at grunau.be
Sun Oct 28 22:54:57 UTC 2007
On Sunday 28 October 2007 23:29:31 Nigel Pearson wrote:
> On 29/10/2007, at 1:11 AM, Daniel Burr wrote:
> >> This breaks backwards compatibility because if somebody updates
> >> mythtv
> >> without adding a value for LocalHostName to their FE and BE
> >> configurations
> >> then they will both break: the BE will refuse to start because
> >> there is no
> >> BackendServerIP corresponding to the hostname "my-unique-
> >> identifier-goes-
> >> here" and the FE will write duplicate entries to the
> >> mythconverg.settings
> >> table with the hostname column set to "my-unique-identifier-goes-
> >> here".
>
> Indeed that is a problem. I just don't know why we haven't
> seen it before? (probably something I broke recently)
I still don't see there the problem is. I have checked it before I
closed the ticket and I can't reproduce it here.
> params.localHostName = d->m_settings->GetSetting
> ("LocalHostName", "");
> - if (params.localHostName.isEmpty())
> - {
> - params.localEnabled = false;
> - params.localHostName = "my-unique-identifier-goes-here";
> - }
> - else
> - params.localEnabled = true;
> + params.localEnabled = params.localHostName.length() > 0;
why not:
+ params.localEnabled = !params.localHostName.isEmpty();
> which should mean that the gethostname() in LoadDatabaseSettings()
> is used for this MythContext, and the default commented line is
> written out in mysql.txt.
I see that behaviour now with unmodified trunk. The proposed change is
ok though.
Janne
More information about the mythtv-dev
mailing list