Skip to content

Commit

Permalink
Add commandline switch to disable UPNP/SSDP
Browse files Browse the repository at this point in the history
Issue #274
  • Loading branch information
manup committed Nov 19, 2017
1 parent ec50881 commit 690a70e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions upnp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ void DeRestPluginPrivate::initUpnpDiscovery()
{
DBG_Assert(udpSock == 0);

initDescriptionXml();

if (deCONZ::appArgumentNumeric("--upnp", 1) == 0)
{
udpSock = 0;
udpSockOut = 0;
joinedMulticastGroup = false;
return;
}

udpSock = new QUdpSocket(this);
udpSockOut = new QUdpSocket(this);
joinedMulticastGroup = false;
Expand All @@ -34,8 +44,6 @@ void DeRestPluginPrivate::initUpnpDiscovery()
connect(upnpTimer, SIGNAL(timeout()),
this, SLOT(announceUpnp()));
upnpTimer->start(1000); // setup phase fast interval

initDescriptionXml();
}

/*! Replaces description_in.xml template with dynamic content. */
Expand Down

0 comments on commit 690a70e

Please sign in to comment.