miniupnpc.c: MX cannot be 0

This commit is contained in:
Thomas Bernard 2013-02-20 17:08:07 +01:00
parent b9daf5cc27
commit 18d54e2ae0
1 changed files with 4 additions and 0 deletions

View File

@ -560,6 +560,10 @@ upnpDiscover(int delay, const char * multicastif,
*error = UPNPDISCOVER_SUCCESS;
/* Calculating maximum response time in seconds */
mx = ((unsigned int)delay) / 1000u;
if(mx == 0) {
mx = 1;
delay = 1000;
}
/* receiving SSDP response packet */
for(n = 0; deviceList[deviceIndex]; deviceIndex++)
{