upnp: avoid locking each libupnp callback exclusively
authorSteve Lhomme <robux4@videolabs.io>
Thu, 2 Jun 2016 12:08:20 +0000 (14:08 +0200)
committerThomas Guillem <thomas@gllm.fr>
Sun, 5 Jun 2016 12:35:06 +0000 (14:35 +0200)
commit6f414985cb7c47de0458e5d50257a402ed0580de
tree286b5474dc74b34853de37a4129019d2a64dfdda
parent17ca1cbf2511728ed4f45ba2d21cec827d500441
upnp: avoid locking each libupnp callback exclusively

UpnpDownloadXmlDoc() can take a while, during that time all other callbacks
are blocking while they could handle simple events quickly (logging) or do
another UpnpDownloadXmlDoc() in parallel.

We only need to lock the MediaServerList in the callbacks when we need it.
And not use it if it's already destroyed.

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
modules/services_discovery/upnp.cpp
modules/services_discovery/upnp.hpp