diff options
author | Jose M. Guisado <jguisado@soleta.eu> | 2021-02-15 13:15:57 +0000 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2021-02-15 16:41:08 +0100 |
commit | 3d1c5b579e95ed20ed7552f404eecd0d7763d112 (patch) | |
tree | 2b63f8b423792aeb045a1efed349aeb12a5144f2 /admin/WebConsole/rest | |
parent | d3c553830b9f964d2d402932b5722ff7ea952384 (diff) |
#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")
Diffstat (limited to 'admin/WebConsole/rest')
-rw-r--r-- | admin/WebConsole/rest/remotepc.php | 4 |
1 files changed, 2 insertions, 2 deletions
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"], |