Skip to content

Commit

Permalink
fix compilation without upnp
Browse files Browse the repository at this point in the history
Broken by 4a3835a

Change-Id: Ifa624480d854fe7ad7acb6adc35a443b354e14d8
Tuleap: #492
  • Loading branch information
EckoEdc authored and gerrit2 committed Mar 22, 2016
1 parent 841326c commit a7b0e23
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/upnp/upnp_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ Controller::~Controller()
{
/* remove all mappings */
removeMappings();
#if HAVE_LIBUPNP
if (listToken_ and upnpContext_)
upnpContext_->removeIGDListener(listToken_);
#endif
}

bool
Expand All @@ -64,9 +66,11 @@ Controller::setIGDListener(IGDFoundCallback&& cb)
{
if (not upnpContext_)
return;
#if HAVE_LIBUPNP
if (listToken_)
upnpContext_->removeIGDListener(listToken_);
listToken_ = cb ? upnpContext_->addIGDListener(std::move(cb)) : 0;
#endif
}

bool
Expand Down

0 comments on commit a7b0e23

Please sign in to comment.