[mythtv-commits] Ticket #12009: backend doesn't start when network interface doesn't have link on it.
MythTV
noreply at mythtv.org
Fri Jan 10 07:00:23 UTC 2014
#12009: backend doesn't start when network interface doesn't have link on it.
--------------------------------------+-------------------------
Reporter: cjanderson@… | Owner:
Type: Bug Report - General | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: Unspecified
Severity: medium | Keywords:
Ticket locked: 0 |
--------------------------------------+-------------------------
I have a machine with a number of interfaces wired and wireless. I want
mythtv to listen on an ethernet interface and not a wireless one.
When I run mythtv-setup I am given a list with all IPs on the interfaces.
There is no link on the ethernet interface but it is up and has an
address.
I now try and start the backend and it tells me that there is no interface
with an address present. This isn't true because the address shows up in
this list:;
project:
TARGET=test
SOURCES += test.cpp
QT -= gui
QT += network
#include <QNetworkInterface>
#include <QStringList>
QStringList GetSettingValueList(const QString &type)
{
QStringList sList;
if (type == "LocalIPAddress")
{
QList<QHostAddress> list = QNetworkInterface::allAddresses();
for (uint i = 0; i < (uint)list.size(); i++)
{
if (list[i].toString().contains(":"))
continue; // ignore IP6 addresses for now
sList << list[i].toString();
qDebug() << list[i].toString();
}
if (sList.isEmpty())
sList << "127.0.0.1";
}
return sList;
}
int main(int argc, char* argv[])
{
(void)argc;
(void)argv;
GetSettingValueList("LocalIPAddress");
return 0;
}
--
Ticket URL: <http://code.mythtv.org/trac/ticket/12009>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list