G_provider_proxy management consolidation
authorMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Tue, 10 Feb 2015 17:41:30 +0000 (18:41 +0100)
committerMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Tue, 10 Feb 2015 17:41:30 +0000 (18:41 +0100)
web/Obj/brisk.phh
web/Obj/sac-a-push.phh
web/spush/brisk-spush.php

index 6061aab..3fc229c 100644 (file)
@@ -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");
index 66b340d..0d489d0 100644 (file)
@@ -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);
     }
index 22def38..f814d00 100755 (executable)
@@ -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;
         }