diff --git a/libretroshare/src/upnp/upnphandler.cc b/libretroshare/src/upnp/upnphandler.cc index 945c3ea49..fb5077c52 100644 --- a/libretroshare/src/upnp/upnphandler.cc +++ b/libretroshare/src/upnp/upnphandler.cc @@ -132,7 +132,7 @@ bool upnphandler::initUPnPState() /* allocate memory */ uPnPConfigData *upcd = new uPnPConfigData; - upcd->devlist = upnpDiscover(2000); + upcd->devlist = upnpDiscover(2000, NULL, NULL); if(upcd->devlist) { struct UPNPDev * device; diff --git a/libretroshare/src/upnp/upnptest.cc b/libretroshare/src/upnp/upnptest.cc index 5a430d284..e4ea45457 100644 --- a/libretroshare/src/upnp/upnptest.cc +++ b/libretroshare/src/upnp/upnptest.cc @@ -69,7 +69,7 @@ int main(int argc, char **argv) } - if (i % 300 == 20) + if (i % 300 == 120) { /* shutdown a forward */ upnp.enableUPnP(false); diff --git a/libretroshare/src/upnp/upnputil.c b/libretroshare/src/upnp/upnputil.c index bd72375f2..7fde9155a 100644 --- a/libretroshare/src/upnp/upnputil.c +++ b/libretroshare/src/upnp/upnputil.c @@ -27,6 +27,7 @@ void DisplayInfos(struct UPNPUrls * urls, char externalIPAddress[16]; char connectionType[64]; char status[64]; + char lastconnerror[64]; unsigned int uptime; unsigned int brUp, brDown; UPNP_GetConnectionTypeInfo(urls->controlURL, @@ -36,8 +37,8 @@ void DisplayInfos(struct UPNPUrls * urls, printf("Connection Type : %s\n", connectionType); else printf("GetConnectionTypeInfo failed.\n"); - UPNP_GetStatusInfo(urls->controlURL, data->servicetype, status, &uptime); - printf("Status : %s, uptime=%u\n", status, uptime); + UPNP_GetStatusInfo(urls->controlURL, data->servicetype, status, &uptime, lastconnerror); + printf("Status : %s, uptime=%u LastConnError %s\n", status, uptime, lastconnerror); UPNP_GetLinkLayerMaxBitRates(urls->controlURL_CIF, data->servicetype_CIF, &brDown, &brUp); printf("MaxBitRateDown : %u bps MaxBitRateUp %u bps\n", brDown, brUp);