mirror of https://git.48k.eu/ogserver
#1043 don't create wol entries when client is connected
Avoids multiple entries of a same client like {"clients": [{"addr": "192.168.2.230", "state": "WOL_SENT"}, {"addr": "192.168.2.230", "state": "OPG"}] These can arise when ogserver processes a WoL request for an already connected client. When processing the WoL request, search for the target address in the clients list, if found we avoid creating the wol entry.master
parent
1f13855e41
commit
927d42bdf8
|
@ -571,6 +571,9 @@ static int og_cmd_wol(json_t *element, struct og_msg_params *params)
|
|||
return 0;
|
||||
|
||||
for (i = 0; i < params->ips_array_len; i++) {
|
||||
if (og_client_find(params->ips_array[i]))
|
||||
continue;
|
||||
|
||||
if (inet_aton(params->ips_array[i], &addr) < 0)
|
||||
return -1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue