Commit 1fd8d460 authored by Max Kellermann's avatar Max Kellermann

lib/upnp/ClientInit: return UpnpClient_Handle

parent 46406d6c
......@@ -153,7 +153,7 @@ UpnpDatabase::Create(EventLoop &, EventLoop &io_event_loop,
void
UpnpDatabase::Open()
{
UpnpClientGlobalInit(handle);
handle = UpnpClientGlobalInit();
discovery = new UPnPDeviceDirectory(event_loop, handle);
try {
......
......@@ -60,8 +60,8 @@ DoInit()
UpnpGetErrorMessage(code));
}
void
UpnpClientGlobalInit(UpnpClient_Handle &handle)
UpnpClient_Handle
UpnpClientGlobalInit()
{
UpnpGlobalInit();
......@@ -75,7 +75,7 @@ UpnpClientGlobalInit(UpnpClient_Handle &handle)
}
++upnp_client_ref;
handle = upnp_client_handle;
return upnp_client_handle;
}
void
......
......@@ -24,8 +24,8 @@
#include <upnp.h>
void
UpnpClientGlobalInit(UpnpClient_Handle &handle);
UpnpClient_Handle
UpnpClientGlobalInit();
void
UpnpClientGlobalFinish() noexcept;
......
......@@ -76,8 +76,7 @@ private:
void
UpnpNeighborExplorer::Open()
{
UpnpClient_Handle handle;
UpnpClientGlobalInit(handle);
auto handle = UpnpClientGlobalInit();
discovery = new UPnPDeviceDirectory(event_loop, handle, this);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment