Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- sqstat.class.php.orig 2015-11-16 16:57:30.986990250 +0500
- +++ sqstat.class.php 2015-11-16 17:01:28.956936237 +0500
- @@ -104,7 +104,7 @@
- }
- fclose($this->fp);
- - if($raw[0]!="HTTP/1.0 200 OK"){
- + if($raw[0]!="HTTP/1.1 200 OK"){
- $this->errno=1;
- $this->errstr="Cannot get data. Server answered: $raw[0]";
- return false;
- @@ -128,8 +128,8 @@
- if($connection){
- /* username field is avaible in Squid 2.6 stable */
- if(substr($v,0,9)=="username ") $parsed["con"][$connection]["username"]=substr($v,9);
- - if(substr($v,0,5)=="peer:") $parsed["con"][$connection]["peer"]=substr($v,6);
- - if(substr($v,0,3)=="me:") $parsed["con"][$connection]["me"]=substr($v,4);
- + if(substr($v,0,7)=="remote:") $parsed["con"][$connection]["remote"]=substr($v,8);
- + if(substr($v,0,6)=="local:") $parsed["con"][$connection]["local"]=substr($v,7);
- if(substr($v,0,4)=="uri ") $parsed["con"][$connection]["uri"]=substr($v,4);
- if(substr($v,0,10)=="delay_pool") $parsed["con"][$connection]["delay_pool"]=substr($v,11);
- @@ -175,7 +175,7 @@
- foreach($data["con"] as $key => $v){
- if(substr($v["uri"],0,13)=="cache_object:") continue; // skip myself
- - $ip=substr($v["peer"],0,strpos($v["peer"],":"));
- + $ip=substr($v["remote"],0,strpos($v["remote"],":"));
- if(isset($hosts_array[$ip])){
- $ip=$hosts_array[$ip];
- }
- @@ -186,7 +186,7 @@
- else $ip=$hostname;
- }
- else{
- - $ip=ip2long(substr($v["peer"],0,strpos($v["peer"],":")));
- + $ip=ip2long(substr($v["remote"],0,strpos($v["remote"],":")));
- }
- $v['connection'] = $key;
- if(!isset($v["username"])) $v["username"]="N/A";
Advertisement
Add Comment
Please, Sign In to add comment