summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2022-01-21 15:11:59 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2022-01-21 15:18:50 +0100
commit1379ee95f49cdcbfebad507e96b531d358506952 (patch)
tree65745387450e40808f6247c86819828d3fdf557b /src
parent20301007a15deede9995da5e6cab3d18ecccedf8 (diff)
#1043 check for WoL pending confirmation logic only for client
REST API request does not need to perform a list lookup on the wol list.
Diffstat (limited to 'src')
-rw-r--r--src/core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core.c b/src/core.c
index 0ff02d4..8b2832a 100644
--- a/src/core.c
+++ b/src/core.c
@@ -344,11 +344,11 @@ void og_server_accept_cb(struct ev_loop *loop, struct ev_io *io, int events)
setsockopt(client_sd, IPPROTO_TCP, TCP_KEEPINTVL, &intl, sizeof(int));
setsockopt(client_sd, IPPROTO_TCP, TCP_KEEPCNT, &cnt, sizeof(int));
- cli_wol = og_client_wol_find(&client_addr.sin_addr);
- if (cli_wol)
- og_client_wol_destroy(cli_wol);
-
if (agent) {
+ cli_wol = og_client_wol_find(&client_addr.sin_addr);
+ if (cli_wol)
+ og_client_wol_destroy(cli_wol);
+
cli = __og_client_find(&client_addr.sin_addr);
if (cli)
og_client_release(loop, cli);