From 3d1c5b579e95ed20ed7552f404eecd0d7763d112 Mon Sep 17 00:00:00 2001 From: "Jose M. Guisado" Date: Mon, 15 Feb 2021 13:15:57 +0000 Subject: #990 restfunctions: wol: require clients and wol_type params only Webconsole is directly querying the database to build the payload for requesting the ogServer a Wake On Lan. ogServer is expected to query the database for the netmask and mac parameters. Do not require the client request to have such parameters. Adjust calls to the wol php method by other OpenGnsys components. Fixes: a35b7c4 ("#990 Use client broadcast address on WoL") --- admin/WebConsole/rest/remotepc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'admin/WebConsole/rest/remotepc.php') diff --git a/admin/WebConsole/rest/remotepc.php b/admin/WebConsole/rest/remotepc.php index 0d8491c0..c3b4fe7c 100644 --- a/admin/WebConsole/rest/remotepc.php +++ b/admin/WebConsole/rest/remotepc.php @@ -129,7 +129,7 @@ EOD; // TODO: if client is busy????? if ($app->settings['debug']) writeRemotepcLog($app->request()->getResourceUri(). ": Send boot command through ogAdmServer: iph=$clntip,mac=$clntmac."); - wol(1, [$clntmac], [$clntip], [$clntnetmask]); + wol(1, [$clntip]); // Send WOL command to client repository. $repo = [['url' => "https://$repoip/opengnsys/rest/repository/poweron", 'header' => ["Authorization: $repokey"], @@ -642,7 +642,7 @@ EOD; // TODO: if client is busy????? if ($app->settings['debug']) writeRemotepcLog("{$app->request()->getResourceUri()}: Send boot command through ogAdmServer: iph=$clntip,mac=$clntmac."); - wol(1, [$clntmac], [$clntip], [$clntnetmask]); + wol(1, [$clntip]); // Send WOL command to client repository. $repo = [['url' => "https://$repoip/opengnsys/rest/repository/poweron", 'header' => ["Authorization: $repokey"], -- cgit v1.2.3-18-g5258