File: 04-changed-ping-response.diff

package info (click to toggle)
serverstats 0.8.2-8
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 604 kB
  • ctags: 796
  • sloc: php: 4,238; perl: 90; sh: 15; makefile: 12
file content (17 lines) | stat: -rw-r--r-- 748 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# The output of /bin/ping has been changed with the consequence, that the
# regexp does not match anymore. Much thanks for fixing this bug to
# Benedikt Marquadt <bene@internet-exception.de>.
# Closes: #596263

diff -Naur serverstats-0.8.2.orig/sources/ping.php serverstats-0.8.2/sources/ping.php
--- serverstats-0.8.2.orig/sources/ping.php	2007-12-03 15:04:48.000000000 +0100
+++ serverstats-0.8.2/sources/ping.php	2010-10-30 19:44:15.000000000 +0200
@@ -57,7 +57,7 @@
 		foreach ($output as $line)
 		{
 			$matches = array();
-			if (preg_match('/^.*icmp_seq=.+ttl=.+time=([0-9\.]+) ms$/', $line, $matches))
+			if (preg_match('/^.*icmp_req=.+ttl=.+time=([0-9\.]+) ms$/', $line, $matches))
 			{
 				$this->ping_time = $matches[1];
 				break;