mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-07 16:45:11 -04:00
Attempt to detect best UPnP library available
Because we don't support libupnp-1.8.x yet avoid using that library If libupnp-1.6.x is available use that, if not try to use miniupnc if if unavailble print a warning and disable RetroShare UPnP support
This commit is contained in:
parent
2498f945f4
commit
fb4f206427
3 changed files with 56 additions and 9 deletions
|
@ -653,10 +653,14 @@ SOURCES += util/folderiterator.cc \
|
|||
equals(RS_UPNP_LIB, miniupnpc) {
|
||||
HEADERS += upnp/upnputil.h upnp/upnphandler_miniupnp.h
|
||||
SOURCES += upnp/upnputil.c upnp/upnphandler_miniupnp.cc
|
||||
} else {
|
||||
HEADERS += upnp/UPnPBase.h upnp/upnphandler_linux.h
|
||||
SOURCES += upnp/UPnPBase.cpp upnp/upnphandler_linux.cc
|
||||
DEFINES *= RS_USE_LIBUPNP
|
||||
}
|
||||
equals(RS_UPNP_LIB, "upnp ixml") { ## libupnp-1.8.x
|
||||
# Not supported yet
|
||||
}
|
||||
equals(RS_UPNP_LIB, "upnp ixml threadutil") { ## libupnp-1.6.x
|
||||
HEADERS += upnp/UPnPBase.h upnp/upnphandler_linux.h
|
||||
SOURCES += upnp/UPnPBase.cpp upnp/upnphandler_linux.cc
|
||||
DEFINES *= RS_USE_LIBUPNP
|
||||
}
|
||||
|
||||
# new gxs cache system
|
||||
|
|
|
@ -1586,9 +1586,11 @@ int RsServer::StartupRetroShare()
|
|||
mNetMgr->addNetListener(mProxyStack);
|
||||
#endif
|
||||
|
||||
#if defined(RS_USE_LIBMINIUPNPC) || defined(RS_USE_LIBUPNP)
|
||||
// Original UPnP Interface.
|
||||
pqiNetAssistFirewall *mUpnpMgr = new upnphandler();
|
||||
mNetMgr->addNetAssistFirewall(1, mUpnpMgr);
|
||||
#endif // defined(RS_USE_LIBMINIUPNPC) || defined(RS_USE_LIBUPNP)
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue