If two threads call UpnpFinish at the same time (or more precisely, if a
2nd thread calls UpnpFinish before the first one sets UpnpSdkInit to 0)
we can end up double releasing most libupnp resources
UPNP SDK functions cannot be called from the registered
callback so there is no point in passing an instance of
upnp instance to the callback as a user data.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Header files should be self-contained and should not have
to adhere to special conditions or include order to include the header.
Also add a header guard
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Move out UpnpInstanceWrapper into its own file
since it no longer has any dependencies on existing
modules and allow other modules to get references to it.
Move as well as the various helper functions that are
directly required by the UpnpInstanceWrapper class
and inline them for a small performance gain.
Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>