miniupnpc.c: MX cannot be 0
This commit is contained in:
parent
b9daf5cc27
commit
18d54e2ae0
|
@ -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++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue