diff options
author | Max Kellermann <max@duempel.org> | 2014-01-16 09:06:01 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-16 09:30:24 +0100 |
commit | a35c7bc81aec11e9720462d8258a0d3c41e2fac7 (patch) | |
tree | f9601aa14c2c12fcfa183d8da248c04f8f55a915 /src/db/upnp/upnpplib.cxx | |
parent | 02769929b31479bffa3e42c101a9bb192c07976f (diff) | |
download | mpd-a35c7bc81aec11e9720462d8258a0d3c41e2fac7.tar.gz mpd-a35c7bc81aec11e9720462d8258a0d3c41e2fac7.tar.xz mpd-a35c7bc81aec11e9720462d8258a0d3c41e2fac7.zip |
db/upnp: move the LibUPnP instance to class UpnpDatabase
Delete the object when closing the database.
Diffstat (limited to '')
-rw-r--r-- | src/db/upnp/upnpplib.cxx | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/db/upnp/upnpplib.cxx b/src/db/upnp/upnpplib.cxx index 508315b26..27b4e0564 100644 --- a/src/db/upnp/upnpplib.cxx +++ b/src/db/upnp/upnpplib.cxx @@ -27,20 +27,6 @@ static LibUPnP *theLib; -LibUPnP * -LibUPnP::getLibUPnP(Error &error) -{ - if (theLib == nullptr) - theLib = new LibUPnP; - - if (!theLib->ok()) { - error.Set(theLib->GetInitError()); - return nullptr; - } - - return theLib; -} - LibUPnP::LibUPnP() { auto code = UpnpInit(0, 0); |