Ticket #6700: mythweb-6700-resolve_hostname_in_MythBackend_find.patch

File mythweb-6700-resolve_hostname_in_MythBackend_find.patch, 1019 bytes (added by sphery <mtdean@…>, 10 years ago)

Adds hostname->IP address resolution to MythBackend::find() -- apply after mythweb-6700-use_hostname_for_preview_pixmaps.patch

  • classes/MythBackend.php

    old new  
    4343                            ."need to check your settings.php file or re-run mythtv-setup",
    4444                            FATAL);
    4545        }
     46        else {
     47            $hostname = $host;
     48            $host = setting('BackendServerIP', $hostname);
     49            $port = setting('BackendServerPort', $hostname);
     50            if (!$host || !$port)
     51                trigger_error("BackendServerIP or BackendServerPort not found "
     52                            ."for ".$hostname."! You may need to check your "
     53                            ."settings.php file or re-run mythtv-setup",
     54                            FATAL);
     55        }
    4656
    4757        if (!isset($Backend[$host][$port]))
    4858            $Backend[$host][$port] = new MythBackend($host, $port);