Handle systems where the backend is configured for wake on lan and idle ...


This change attempts to address the working of the cmyth.pvr addon when the mythtv backend is configured for wake on lan and shutdown when idle. It attempts to restore the addon to the way it was working in Frodo when used in conjunction with the AdvancedWakeonLan program addon.

The changes in the file MythConnection.cpp address waking up the backend when the addon is first started.

The changes in MythEventHandler.cpp address handling the situation where the backend performs an idle shutdown and the current connections are lost. The ideal would be for this situation not to arise. However the version of libcmyth being used does not support the required functions, a port to the latest libcmyth would be required. Instead a horrible hack is performed to ensure that a wake on lan packet is sent every time the EventHandler class executes RetryConnect. Dirty, but it seems to work.

It should be noted that the recovery from idle shutdown problem will still exist even if the MythTV Web Services API is used instead of cmyth, as currently activity in the mythtv web server does not prevent idle shutdown of the backend.

Roger