upnp: correctly fix deadlock when calling UpnpUnRegisterClient
authorThomas Guillem <thomas@gllm.fr>
Mon, 8 Feb 2016 17:04:36 +0000 (18:04 +0100)
committerThomas Guillem <thomas@gllm.fr>
Mon, 8 Feb 2016 17:20:41 +0000 (18:20 +0100)
commit2d7589e4f45f97c91ef6f151dc76ef2c4810e842
tree0a45e6c83f3735475e3d203ea2b8f894bb0f014d
parent72c84ba4b3b2a830236841cce6f58681615140d8
upnp: correctly fix deadlock when calling UpnpUnRegisterClient

UpnpInstanceWrapper::Callback() can be called while Upnp is unregistering via
UpnpUnRegisterClient(). Both functions locked the same mutex (s_lock) and this
resulted to a deadlock.

Add a new mutex to protect only the upnp callback.
modules/services_discovery/upnp.cpp
modules/services_discovery/upnp.hpp