GNOME Bugzilla – Bug 673150
Searching for versioned resources does not work properly
Last modified: 2019-02-22 09:30:02 UTC
If you create a new control point with the target urn:schemas-upnp-org:device:MediaServer:1 the control-point will send the proxy-unavailable signal after max-age seconds for devices that implement MediaServer:2 or higher. The reason is that the initial time-out is set for an USN with the version searched for since UDA 1.0, 1.2.2 requires to reply with the requested version, but later alive announcements only use the highest version (as required by UDA 1.0, 1.1.2) So the USN cache never matches and the time-out set-up by the search response is never cleared, declaring the device unavailable.
That's basically the other side of ad16c1ab2e14c8736bbef0397667ad782dc8d218
Created attachment 210942 [details] [review] tests: Add regression test for bgo#673150
Created attachment 210949 [details] [review] Don't ignore higher version alive announcements Previously if a ResourceBrowser was searching for e.g. MediaServer:1 but a device supporting MediaServer:2 replied to the search request, a cache entry with MediaServer:1 (the device rightfully replying with that version as required by UDA) was generated and a resource timeout was set up. However, subsequent alive announcements from that service resulted in a cache miss since it announces MediaServer:2 only as required by the UDA document.
Review of attachment 210949 [details] [review]: ::: libgssdp/gssdp-resource-browser.c @@ +635,3 @@ + pivot = strrchr (usn, ':'); + if (pivot != NULL) + *pivot = '\0'; I'm not super-happy about this, suggestions welcome.
Forgot to modify resource_unavailable as well :-/
Comment on attachment 210949 [details] [review] Don't ignore higher version alive announcements That patch is broken
Created attachment 211145 [details] [review] tests: Add regression test for bgo#673150
Created attachment 211146 [details] [review] tests: Add some functional tests
Created attachment 211147 [details] [review] Ignore announcements from services with a lower version
Created attachment 211148 [details] [review] Make internal resource cache version-independant
Created attachment 211239 [details] [review] Ignore announcements from services with a lower version Fix two leaks
Attachment 211146 [details] pushed as 445d02f - tests: Add some functional tests Attachment 211148 [details] pushed as 4ad03dc - Make internal resource cache version-independant Attachment 211239 [details] pushed as 612a8d9 - Ignore announcements from services with a lower version
Commit 612a8d9 seems to introduce two memory leaks in check_target_compat. This function returns at lines 852 and 855 without calling g_match_info_free.
ehm true.
Fixed