Skip to content
Snippets Groups Projects
Commit a7b0e236 authored by Edric Milaret's avatar Edric Milaret Committed by gerrit2
Browse files

fix compilation without upnp

Broken by 4a3835ad

Change-Id: Ifa624480d854fe7ad7acb6adc35a443b354e14d8
Tuleap: #492
parent 841326cf
No related branches found
No related tags found
No related merge requests found
...@@ -46,8 +46,10 @@ Controller::~Controller() ...@@ -46,8 +46,10 @@ Controller::~Controller()
{ {
/* remove all mappings */ /* remove all mappings */
removeMappings(); removeMappings();
#if HAVE_LIBUPNP
if (listToken_ and upnpContext_) if (listToken_ and upnpContext_)
upnpContext_->removeIGDListener(listToken_); upnpContext_->removeIGDListener(listToken_);
#endif
} }
bool bool
...@@ -64,9 +66,11 @@ Controller::setIGDListener(IGDFoundCallback&& cb) ...@@ -64,9 +66,11 @@ Controller::setIGDListener(IGDFoundCallback&& cb)
{ {
if (not upnpContext_) if (not upnpContext_)
return; return;
#if HAVE_LIBUPNP
if (listToken_) if (listToken_)
upnpContext_->removeIGDListener(listToken_); upnpContext_->removeIGDListener(listToken_);
listToken_ = cb ? upnpContext_->addIGDListener(std::move(cb)) : 0; listToken_ = cb ? upnpContext_->addIGDListener(std::move(cb)) : 0;
#endif
} }
bool bool
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment