First commit.
This branch will contain fixes for the UPnP library to enable support for CableCARD tuners. Current fixes are as follows:
1. Add quotes around the SOAPAction HTTP header. The Ceton InfiniTV 4 rejects actions without these.
2. Support receiving action output parameter values in random order. This is also required for the Ceton InfiniTV 4. Note that the Ceton is a UPnP 1.0 device. UPnP 1.1 requires that output parameters are returned in the order of the action definition in the service descriptor, however UPnP 1.0 does not have the same requirement.
3. Fix the timeout calculation for the _subscriptionRenewalTimer. The calculation was mixing milliseconds and seconds and used *.Milliseconds instead of *.TotalMilliseconds.
4. Add workaround for devices that return an incorrect DATE value in state variable subscription responses. The Ceton InfiniTV 4 is such a device. The DATE value is determined by internal firmware that can't be corrected. It seems to be set to 01/01/1970 when the tuner is first used. This inaccuracy leads to the library thinking that the subscription has already expired on receipt of the subscription response, which in turn leads to unending floods of attempts to renew the subscriptions.
(MP2-368)
Don't use keep-alive for action requests. I found it does not work so well with the Ceton InfiniTV 4. This may need to become a setting in future, because obviously using keep-alive can have some performance benefits.
(MP2-368)
We've received contact from Ceton to say that they don't think their HTTP stack supports keep-alive... so I've parametised that setting. Also some tweaks to double-triple check that HttpWebRequest instance handling is correct.
(MP2-368)
Set a default value for the new useHttpKeepAlive parameter on the DeviceConnection constructor and UPnPControlPoint.Connect() method. We use true because the hard-coded value was previously true.
(MP2-368)
Fix parsing of state variable default values.
(MP2-368)
It seems that the DATE header in service eventing subscription responses is not always present. At least, that is the case for the Silicondust HDHomeRun PRIME. Assume that the subscription expiry timer starts from <now> when the header is not available. Actually, I suspect that is probably the correct logic/behaviour...
(MP2-368)
Remove duplicated call to SSDPClientController.SearchAll().
The UPnPNetworkTracker calls the function in its Start() function. Same for the SSDPClientController.
Since the UPnPNetworkTracker Start() function calls the SSDPClientController Start() function there is only need for either the UPnPNetworkTracker or SSDPClientController to call SearchAll(). I chose to keep the UPnPNetworkTracker call.
(MP2-368)