[mythtv-users] ticket 10504 and php-5.4.8-1.fc17.x86_64

Udo van den Heuvel udovdh at xs4all.nl
Mon Dec 10 07:47:18 UTC 2012


See  ./mythtv/libs/libmyth/mythcontext.cpp

    QString hostname = m_DBparams.localHostName;
    if (hostname.isEmpty() ||
        hostname == "my-unique-identifier-goes-here")
    {
        char localhostname[1024];
        if (gethostname(localhostname, 1024))
        {
            LOG(VB_GENERAL, LOG_ALERT,
                    "MCP: Error, could not determine host name." + ENO);
            localhostname[0] = '\0';
        }
        hostname = localhostname;
        LOG(VB_GENERAL, LOG_NOTICE, "Empty LocalHostName.");

Do you understand what it does?
It does not even check if the default value of LocalHostName actually
works, it just discards it.
How stupid is that in the land of the free?
Did you check how many times the my-unique-identifier-goes-here string
occurs in the source tree?
Who thought that that was a good idea?

The `"MCP: Error, could not determine host name." + ENO);` line is
somewhat descriptive, the "Empty LocalHostName." is  - as explained
before - extremely false.

Consider using something like `ChangeOnInstall` or whatever is or was
the Oracle default for certain passwords.
That's more descriptive of what you apparently want.
Next let the backend error when the LocalHostName is still the default
mentioning that it is still the default.

How difficult is that?

Please do NOT implement these changes. Instead fix the leaks.

Udo


More information about the mythtv-users mailing list