From be3641128b5416644c41236d49b8884626f3ecb9 Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Tue, 10 Feb 2015 18:41:30 +0100 Subject: [PATCH] G_provider_proxy management consolidation --- web/Obj/brisk.phh | 2 +- web/Obj/sac-a-push.phh | 6 ++---- web/spush/brisk-spush.php | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index 6061aab..3fc229c 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -1054,7 +1054,7 @@ class Brisk } // constructor - static function create($crystal_filename, $ban_list, $black_list, $cloud_smasher, $prov_proxy) { + static function create($crystal_filename, $ban_list, $black_list, $cloud_smasher) { if (($brisk_ser = @file_get_contents($crystal_filename)) != FALSE) { if (($brisk = unserialize($brisk_ser)) != FALSE) { fprintf(STDERR, "ROOM FROM FILE\n"); diff --git a/web/Obj/sac-a-push.phh b/web/Obj/sac-a-push.phh index 66b340d..0d489d0 100644 --- a/web/Obj/sac-a-push.phh +++ b/web/Obj/sac-a-push.phh @@ -455,10 +455,8 @@ class Sac_a_push { } } - static function create(&$app, $sockname, $debug, $blocking_mode, $argv) + static function create(&$app, $sockname, $debug, $blocking_mode, $provider_proxy, $argv) { - GLOBAL $G_provider_proxy; - $thiz = new Sac_a_push(); $thiz->app = $app; @@ -524,7 +522,7 @@ class Sac_a_push { } $thiz->main_loop = FALSE; - $thiz->reload(TRUE, $G_provider_proxy); + $thiz->reload(TRUE, $provider_proxy); return ($thiz); } diff --git a/web/spush/brisk-spush.php b/web/spush/brisk-spush.php index 22def38..f814d00 100755 --- a/web/spush/brisk-spush.php +++ b/web/spush/brisk-spush.php @@ -47,13 +47,13 @@ function main($argv) pid_save(); do { - if (($brisk = Brisk::create(LEGAL_PATH."/brisk-crystal.data", $G_ban_list, $G_black_list, $G_cloud_smasher, $G_provider_proxy)) == FALSE) { + if (($brisk = Brisk::create(LEGAL_PATH."/brisk-crystal.data", $G_ban_list, $G_black_list, $G_cloud_smasher)) == FALSE) { log_crit("Brisk::create failed"); $ret = 1; break; } - if (($s_a_p = Sac_a_push::create($brisk, USOCK_PATH, 0, 0, $argv)) === FALSE) { + if (($s_a_p = Sac_a_push::create($brisk, USOCK_PATH, 0, 0, $G_provider_proxy, $argv)) === FALSE) { $ret = 2; break; } -- 2.17.1