- it looks like some UPnP server implementations consider NewRemoteHost
  to be a mandatory tag
This commit is contained in:
Peter Šurda 2016-06-22 22:54:06 +02:00
parent 0689525d61
commit 6add48e036
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -110,6 +110,7 @@ class Router:
def AddPortMapping(self, externalPort, internalPort, internalClient, protocol, description, leaseDuration = 0, enabled = 1):
from debug import logger
resp = self.soapRequest(self.upnp_schema + ':1', 'AddPortMapping', [
('NewRemoteHost', ''),
('NewExternalPort', str(externalPort)),
('NewProtocol', protocol),
('NewInternalPort', str(internalPort)),
@ -125,6 +126,7 @@ class Router:
def DeletePortMapping(self, externalPort, protocol):
from debug import logger
resp = self.soapRequest(self.upnp_schema + ':1', 'DeletePortMapping', [
('NewRemoteHost', ''),
('NewExternalPort', str(externalPort)),
('NewProtocol', protocol),
])