lib/upnp/ClientInit: return UpnpClient_Handle
This commit is contained in:
parent
46406d6cca
commit
1fd8d46064
@ -153,7 +153,7 @@ UpnpDatabase::Create(EventLoop &, EventLoop &io_event_loop,
|
|||||||
void
|
void
|
||||||
UpnpDatabase::Open()
|
UpnpDatabase::Open()
|
||||||
{
|
{
|
||||||
UpnpClientGlobalInit(handle);
|
handle = UpnpClientGlobalInit();
|
||||||
|
|
||||||
discovery = new UPnPDeviceDirectory(event_loop, handle);
|
discovery = new UPnPDeviceDirectory(event_loop, handle);
|
||||||
try {
|
try {
|
||||||
|
@ -60,8 +60,8 @@ DoInit()
|
|||||||
UpnpGetErrorMessage(code));
|
UpnpGetErrorMessage(code));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
UpnpClient_Handle
|
||||||
UpnpClientGlobalInit(UpnpClient_Handle &handle)
|
UpnpClientGlobalInit()
|
||||||
{
|
{
|
||||||
UpnpGlobalInit();
|
UpnpGlobalInit();
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ UpnpClientGlobalInit(UpnpClient_Handle &handle)
|
|||||||
}
|
}
|
||||||
|
|
||||||
++upnp_client_ref;
|
++upnp_client_ref;
|
||||||
handle = upnp_client_handle;
|
return upnp_client_handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -24,8 +24,8 @@
|
|||||||
|
|
||||||
#include <upnp.h>
|
#include <upnp.h>
|
||||||
|
|
||||||
void
|
UpnpClient_Handle
|
||||||
UpnpClientGlobalInit(UpnpClient_Handle &handle);
|
UpnpClientGlobalInit();
|
||||||
|
|
||||||
void
|
void
|
||||||
UpnpClientGlobalFinish() noexcept;
|
UpnpClientGlobalFinish() noexcept;
|
||||||
|
@ -76,8 +76,7 @@ private:
|
|||||||
void
|
void
|
||||||
UpnpNeighborExplorer::Open()
|
UpnpNeighborExplorer::Open()
|
||||||
{
|
{
|
||||||
UpnpClient_Handle handle;
|
auto handle = UpnpClientGlobalInit();
|
||||||
UpnpClientGlobalInit(handle);
|
|
||||||
|
|
||||||
discovery = new UPnPDeviceDirectory(event_loop, handle, this);
|
discovery = new UPnPDeviceDirectory(event_loop, handle, this);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user