mirror of
https://github.com/status-im/miniupnp.git
synced 2025-01-17 18:01:09 +00:00
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…
x
Reference in New Issue
Block a user