From c09f1a53453d47ff1f7467655e95d109ada76f02 Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Fri, 4 Jan 2013 10:11:42 +0100 Subject: [PATCH] old unused code removed --- web/Obj/brisk.phh | 38 -------------------------------------- web/Obj/user.phh | 2 -- 2 files changed, 40 deletions(-) diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index 5ed3588..00c3222 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -337,42 +337,6 @@ function file_unlock($res) } } -function webservers_exceeded() -{ - return(file_exists(PROXY_PATH."/webservers_exceded.flag")); -} - -function webservers_check() -{ - GLOBAL $G_webserver_max; - - /* FIXME: check all procs expirations */ - return (10); - - $ct = 0; - - $dh = opendir('/proc'); - while (($file = readdir($dh)) !== false) { - if (preg_match('/[0-9]+/', $file)) { - $cmdline = explode("\0", file_get_contents('/proc/'.$file.'/cmdline')); - // echo "xxx".$cmdline[0].$n; - if (strstr('/usr/sbin/apache2', $cmdline[0]) != FALSE) { - // echo "yyy".$cmdline[0].$n; - $ct++; - } - } - } - closedir($dh); - - if ($ct >= $G_webserver_max) { - touch(PROXY_PATH."/webservers_exceded.flag"); - } - else { - unlink(PROXY_PATH."/webservers_exceded.flag"); - } - return ($ct); -} - $escpush_from = array("\\", "\""); $escpush_to = array("\\\\", "\\\""); function escpush($s) @@ -743,8 +707,6 @@ class Room return ($ismod); } - webservers_check(); - // Before all align times with table timeout for ($table_idx = 0 ; $table_idx < TABLES_N ; $table_idx++) { $table_cur = $this->table[$table_idx]; diff --git a/web/Obj/user.phh b/web/Obj/user.phh index d5e82ee..b7409de 100644 --- a/web/Obj/user.phh +++ b/web/Obj/user.phh @@ -679,8 +679,6 @@ function stream_init($init_string, $enc, &$header_out, &$body, $get, $post, $coo $curtime = time(); printf("CLASS: [%s] base: [%s]\n", get_class($this), self::base_get()); - - // (webservers_exceeded() || stristr($HTTP_USER_AGENT, "Mozilla/5.0 (Windows NT 6.1; rv:5.0)") || stristr($HTTP_USER_AGENT, "MSIE") || stristr($HTTP_USER_AGENT, "CHROME") ? TRUE : FALSE); log_load("index_rd_ifra_init.php"); -- 2.17.1