cvs: pear /Net_Ping Ping.php
| From: | CHAILLAN Nicolas | Date: | Wed, 30 Jul 2003 20:33:55 +0000 |
| Subject: | cvs: pear /Net_Ping Ping.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-11813@lists.php.net to get a copy of this message | ||
nicos Wed Jul 30 16:33:55 2003 EDT
Modified files:
/pear/Net_Ping Ping.php
Log:
fixing #24826
Index: pear/Net_Ping/Ping.php
diff -u pear/Net_Ping/Ping.php:1.25 pear/Net_Ping/Ping.php:1.26
--- pear/Net_Ping/Ping.php:1.25 Mon Jul 14 16:26:55 2003
+++ pear/Net_Ping/Ping.php Wed Jul 30 16:33:55 2003
@@ -19,7 +19,7 @@
// | Kai Schröder <k.schroeder@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Ping.php,v 1.25 2003/07/14 20:26:55 jan Exp $
+// $Id: Ping.php,v 1.26 2003/07/30 20:33:55 nicos Exp $
require_once "PEAR.php";
require_once "OS/Guess.php";
@@ -69,7 +69,7 @@
* ?>
*
* @author Jan Lehnardt <jan@php.net>
-* @version $Revision: 1.25 $
+* @version $Revision: 1.26 $
* @package Net
* @access public
*/
@@ -448,7 +448,7 @@
* Container class for Net_Ping results
*
* @author Jan Lehnardt <jan@php.net>
-* @version $Revision: 1.25 $
+* @version $Revision: 1.26 $
* @package Net
* @access private
*/
@@ -606,13 +606,14 @@
/* if mdev field exists, shift input one unit left */
if (strpos($this->_raw_data[$raw_data_len - 1], 'mdev')) {
+ /* do not forget the rtt field */
+ $this->_round_trip['min'] = ltrim($round_trip[5]);
+ $this->_round_trip['avg'] = $round_trip[6];
+ $this->_round_trip['max'] = $round_trip[7];
+ } else {
$this->_round_trip['min'] = ltrim($round_trip[4]);
$this->_round_trip['avg'] = $round_trip[5];
$this->_round_trip['max'] = $round_trip[6];
- } else {
- $this->_round_trip['min'] = ltrim($round_trip[3]);
- $this->_round_trip['avg'] = $round_trip[4];
- $this->_round_trip['max'] = $round_trip[5];
}
}