miniupnpc.c: MX cannot be 0
This commit is contained in:
parent
91602e129d
commit
3e885191c0
|
@ -533,6 +533,10 @@ upnpDiscoverDevices(const char * const deviceTypes[],
|
|||
*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(deviceIndex = 0; deviceTypes[deviceIndex]; deviceIndex++) {
|
||||
/* sending the SSDP M-SEARCH packet */
|
||||
|
|
Loading…
Reference in New Issue