db/upnp: remove unnecessary Mutex
This commit is contained in:
parent
71d012fa61
commit
4b3a3d6faa
@ -68,8 +68,6 @@ LibUPnP::LibUPnP()
|
|||||||
void
|
void
|
||||||
LibUPnP::registerHandler(Upnp_EventType et, Upnp_FunPtr handler, void *cookie)
|
LibUPnP::registerHandler(Upnp_EventType et, Upnp_FunPtr handler, void *cookie)
|
||||||
{
|
{
|
||||||
const ScopeLock protect(m_mutex);
|
|
||||||
|
|
||||||
if (handler == nullptr)
|
if (handler == nullptr)
|
||||||
m_handlers.erase(et);
|
m_handlers.erase(et);
|
||||||
else
|
else
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#ifndef _LIBUPNP_H_X_INCLUDED_
|
#ifndef _LIBUPNP_H_X_INCLUDED_
|
||||||
#define _LIBUPNP_H_X_INCLUDED_
|
#define _LIBUPNP_H_X_INCLUDED_
|
||||||
|
|
||||||
#include "thread/Mutex.hxx"
|
|
||||||
#include "util/Error.hxx"
|
#include "util/Error.hxx"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
@ -40,7 +39,6 @@ class LibUPnP {
|
|||||||
|
|
||||||
Error init_error;
|
Error init_error;
|
||||||
UpnpClient_Handle m_clh;
|
UpnpClient_Handle m_clh;
|
||||||
Mutex m_mutex;
|
|
||||||
std::map<Upnp_EventType, Handler> m_handlers;
|
std::map<Upnp_EventType, Handler> m_handlers;
|
||||||
|
|
||||||
LibUPnP();
|
LibUPnP();
|
||||||
|
Loading…
Reference in New Issue
Block a user