summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/rest
diff options
context:
space:
mode:
authorRamón M. Gómez <ramongomez@us.es>2019-10-23 18:50:01 +0200
committerRamón M. Gómez <ramongomez@us.es>2019-10-23 18:50:01 +0200
commit3dc405380a8cecaa4523ad4db75c9a0ba9e72a11 (patch)
treeb5fd516dcce835847239da2ad353e1c4ea7e1c9a /admin/WebConsole/rest
parentd7a763b5cd00348e7a2cf1827658c104bfb5c771 (diff)
#915: Remove REST function `sendCommand` obsoleted by the ogAdmServer REST API.
Diffstat (limited to 'admin/WebConsole/rest')
-rw-r--r--admin/WebConsole/rest/common.php38
1 files changed, 0 insertions, 38 deletions
diff --git a/admin/WebConsole/rest/common.php b/admin/WebConsole/rest/common.php
index d26acc4b..ac4dfb00 100644
--- a/admin/WebConsole/rest/common.php
+++ b/admin/WebConsole/rest/common.php
@@ -161,44 +161,6 @@ function checkIds() {
}
/**
- * @fn sendCommand($serverip, $serverport, $reqframe, &$values)
- * @brief Send a command to an OpenGnsys ogAdmServer and get request.
- * @param string serverip Server IP address.
- * @param string serverport Server port.
- * @param string reqframe Request frame (field's separator is "\r").
- * @param array values Response values (out parameter).
- * @return boolean "true" if success, otherwise "false".
- */
-function sendCommand($serverip, $serverport, $reqframe, &$values) {
- global $LONCABECERA;
- global $LONHEXPRM;
-
- // Connect to server.
- $respvalues = "";
- $connect = new SockHidra($serverip, $serverport);
- if ($connect->conectar()) {
- // Send request frame to server.
- $result = $connect->envia_peticion($reqframe);
- if ($result) {
- // Parse request frame.
- $respframe = $connect->recibe_respuesta();
- $connect->desconectar();
- $paramlen = hexdec(substr($respframe, $LONCABECERA, $LONHEXPRM));
- $params = substr($respframe, $LONCABECERA+$LONHEXPRM, $paramlen);
- // Fetch values and return result.
- $values = extrae_parametros($params, "\r", '=');
- return ($values);
- } else {
- // Return with error.
- return (false);
- }
- } else {
- // Return with error.
- return (false);
- }
-}
-
-/**
* @brief Show custom message for "not found" error (404).
*/
$app->notFound(function() {