[mythtv-users] Mythbackend does not bind to IP addresses of interfaces without carrier
Florian Evers
florian-evers at gmx.de
Wed Jun 26 21:03:46 UTC 2013
Hi Raymond,
Am Mittwoch, 26. Juni 2013, 13:17:46 schrieb Raymond Wagner:
> We get a list of available addresses on the system through the Qt
> libraries. If the address you want to use is not being used by
> MythBackend, it's because we're being told it doesn't currently exist,
> and so we don't attempt to bind to it.
Okay, that sounds very interesting, so I took a look into the sources. The
results are as follows:
In the file libs/libmythbase/serverpool.cpp, the available interfaces are
enumerated and their IP adresses are obtained. Very interesting is line 109.
Here, the current interface iterator is checked if the interface is
"isRunning"... and if it is not running, it is skipped!
An ethernet interface, fully configured, UP, but without a cable attached is
NOT "isRunning". Same with a bridge that constists solely of interfaces that
have no carrier... it is skipped as well. This is the reason for my problems.
Having a look at the docs at
http://harmattan-dev.nokia.com/docs/library/html/qt4/qnetworkinterface.html
brings to light that besides "NetworkInterface::IsRunning" there is also
"QNetworkInterface::IsUp". Using the latter yields the expected behavior of
mythbackend, and everything would be okay.
Is there a reason why "isRunning" is used instead of "isUp"? If not, this
would be a quick edit ;-)
Regards,
Florian
More information about the mythtv-users
mailing list