upnp: change interface variable name

rpc.h under Windows defines interface as struct, which blows up the
build here. Rename to avoid.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2023-12-27 12:50:47 -08:00
parent d0a4270449
commit f6dbf38e99

View File

@ -60,13 +60,13 @@ class UpnpDatabase : public Database {
UpnpClient_Handle handle; UpnpClient_Handle handle;
UPnPDeviceDirectory *discovery; UPnPDeviceDirectory *discovery;
const char* interface; const char* iface;
public: public:
explicit UpnpDatabase(EventLoop &_event_loop, const ConfigBlock &block) noexcept explicit UpnpDatabase(EventLoop &_event_loop, const ConfigBlock &block) noexcept
:Database(upnp_db_plugin), :Database(upnp_db_plugin),
event_loop(_event_loop), event_loop(_event_loop),
interface(block.GetBlockValue("interface", nullptr)) {} iface(block.GetBlockValue("interface", nullptr)) {}
static DatabasePtr Create(EventLoop &main_event_loop, static DatabasePtr Create(EventLoop &main_event_loop,
EventLoop &io_event_loop, EventLoop &io_event_loop,
@ -142,7 +142,7 @@ UpnpDatabase::Create(EventLoop &, EventLoop &io_event_loop,
void void
UpnpDatabase::Open() UpnpDatabase::Open()
{ {
handle = UpnpClientGlobalInit(interface); handle = UpnpClientGlobalInit(iface);
discovery = new UPnPDeviceDirectory(event_loop, handle); discovery = new UPnPDeviceDirectory(event_loop, handle);
try { try {