diff options
author | ramon <ramongomez@us.es> | 2016-03-17 18:47:21 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2016-03-17 18:47:21 +0000 |
commit | ba3c59d189d255f6aab9259799da505a5c5aefb0 (patch) | |
tree | 6c5c34b59bc1e04180ae27dbc081aa032a1b762e | |
parent | ebee36cab3c286967674a569a7cede5b7cd2750d (diff) |
#739: Corregir errata y establecer timeout para peticiones REST en sondeo de estado.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@4839 a21b9725-9963-47de-94b9-378ad31fedc9
-rw-r--r-- | admin/WebConsole/includes/restfunctions.php | 7 | ||||
-rw-r--r-- | admin/WebConsole/principal/sondeo.php | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/admin/WebConsole/includes/restfunctions.php b/admin/WebConsole/includes/restfunctions.php index f3590969..5bea9c0b 100644 --- a/admin/WebConsole/includes/restfunctions.php +++ b/admin/WebConsole/includes/restfunctions.php @@ -24,14 +24,15 @@ function multiRequest($data, $options = array()) { $curly[$id] = curl_init(); $url = (is_array($d) && !empty($d['url'])) ? $d['url'] : $d; - curl_setopt($curly[$id], CURLOPT_URL, $url); - curl_setopt($curly[$id], CURLOPT_HEADER, 0); + curl_setopt($curly[$id], CURLOPT_URL, $url); + curl_setopt($curly[$id], CURLOPT_HEADER, 0); curl_setopt($curly[$id], CURLOPT_RETURNTRANSFER, 1); + curl_setopt($curly[$id], CURLOPT_TIMEOUT, 1000); // post? if (is_array($d)) { if (!empty($d['post'])) { - curl_setopt($curly[$id], CURLOPT_POST, 1); + curl_setopt($curly[$id], CURLOPT_POST, 1); curl_setopt($curly[$id], CURLOPT_POSTFIELDS, $d['post']); } } diff --git a/admin/WebConsole/principal/sondeo.php b/admin/WebConsole/principal/sondeo.php index 2cc30ea4..ea11e6e5 100644 --- a/admin/WebConsole/principal/sondeo.php +++ b/admin/WebConsole/principal/sondeo.php @@ -44,7 +44,7 @@ RecopilaIpesMacs($cmd,$ambito,$idambito); // Ámbito de aplicación $aplicacion="ido=".$cadenaid.chr(13)."iph=".$cadenaip.chr(13); // Reset status. - echo "cadenaip"; + echo "$cadenaip;"; //________________________________________________________________________________________________________ // Envio al servidor de la petición //________________________________________________________________________________________________________ |