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/includes/RecopilaIpesMacs.php | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'admin/WebConsole/includes/RecopilaIpesMacs.php') diff --git a/admin/WebConsole/includes/RecopilaIpesMacs.php b/admin/WebConsole/includes/RecopilaIpesMacs.php index 4601a4a2..c41547dc 100644 --- a/admin/WebConsole/includes/RecopilaIpesMacs.php +++ b/admin/WebConsole/includes/RecopilaIpesMacs.php @@ -165,22 +165,3 @@ function RecorreOrdenadores($cmd){ } $rs->Cerrar(); } - -function get_netmasks($cmd, &$macs, &$netmasks){ - $macs = str_replace(";", "','", $macs); - $cmd->texto="SELECT mac, mascara - FROM ordenadores - WHERE mac IN ('".$macs."')"; - $rs=new Recordset; - $rs->Comando=&$cmd; - if (!$rs->Abrir()) return; - $macs = ""; - while (!$rs->EOF){ - $macs.=$rs->campos["mac"].";"; - $netmasks.=$rs->campos["mascara"].";"; - $rs->Siguiente(); - } - $rs->Cerrar(); - $macs = substr($macs, 0, -1); - $netmasks = substr($netmasks, 0, -1); -} -- cgit v1.2.3-18-g5258