miniupnpcmodule.c: follow UPNP_GetValidIGD() changes
This commit is contained in:
parent
3ab526b665
commit
2b4c0c5ca2
|
@ -49,6 +49,7 @@ typedef struct {
|
|||
unsigned int discoverdelay; /* value passed to upnpDiscover() */
|
||||
unsigned int localport; /* value passed to upnpDiscover() */
|
||||
char lanaddr[40]; /* our ip address on the LAN */
|
||||
char wanaddr[40]; /* the ExternalIPAddress returned by the IGD */
|
||||
char * multicastif;
|
||||
char * minissdpdsocket;
|
||||
} UPnPObject;
|
||||
|
@ -57,6 +58,9 @@ static PyMemberDef UPnP_members[] = {
|
|||
{"lanaddr", T_STRING_INPLACE, offsetof(UPnPObject, lanaddr),
|
||||
READONLY, "ip address on the LAN"
|
||||
},
|
||||
{"wanaddr", T_STRING_INPLACE, offsetof(UPnPObject, lanaddr),
|
||||
READONLY, "public ip address on the WAN"
|
||||
},
|
||||
{"discoverdelay", T_UINT, offsetof(UPnPObject, discoverdelay),
|
||||
0/*READWRITE*/, "value in ms used to wait for SSDP responses"
|
||||
},
|
||||
|
@ -164,7 +168,8 @@ UPnP_selectigd(UPnPObject *self, PyObject *args)
|
|||
Py_BEGIN_ALLOW_THREADS
|
||||
if (rootDescUrl == NULL) {
|
||||
r = UPNP_GetValidIGD(self->devlist, &self->urls, &self->data,
|
||||
self->lanaddr, sizeof(self->lanaddr));
|
||||
self->lanaddr, sizeof(self->lanaddr),
|
||||
self->wanaddr, sizeof(self->wanaddr));
|
||||
} else {
|
||||
r = UPNP_GetIGDFromUrl(rootDescUrl, &self->urls, &self->data,
|
||||
self->lanaddr, sizeof(self->lanaddr));
|
||||
|
|
Loading…
Reference in New Issue