X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fspush%2Fbrisk-spush.php;h=7b1ddc0df96c93dfce9361da6bf8f61953cc1d2b;hb=7bccbb21239ca3cecf2914e9b307ab1e1b1aa46e;hp=8eece0c1c5538a5e3780446f3181f5ab89b97569;hpb=5251efdfad905c4ef44de1efd5c274688132a776;p=brisk.git diff --git a/web/spush/brisk-spush.php b/web/spush/brisk-spush.php index 8eece0c..7b1ddc0 100755 --- a/web/spush/brisk-spush.php +++ b/web/spush/brisk-spush.php @@ -31,6 +31,8 @@ require_once($G_base."Obj/user.phh"); require_once($G_base."Obj/brisk.phh"); require_once($G_base."Obj/auth.phh"); require_once($G_base."Obj/zlibstream.phh"); +require_once($G_base."Obj/mail.phh"); +require_once($G_base."Obj/curl-de-brisk.phh"); // require_once("../Obj/proxyscan.phh"); require_once($G_base."index.php"); require_once($G_base."index_wr.php"); @@ -39,21 +41,42 @@ require_once($G_base."briskin5/index.php"); require_once($G_base."briskin5/index_wr.php"); -function main() +function main($argv) { - if (($room = Room::create(LEGAL_PATH."/brisk-crystal.data")) == FALSE) { - log_crit("room::create failed"); - exit(1); - } + GLOBAL $G_ban_list, $G_black_list; + + // create cds + $cds = new Curl_de_sac(); - if (($s_a_p = Sac_a_push::create($room, USOCK_PATH, 0, 0)) === FALSE) { + // create tor_chk_cls + $tor_chk_cls = new tor_chk_cmd_cls(); + + // registrer tor_chk_cls + printf("MAIN: Register 'tor_chk_cls'\n"); + if (($cds->cmd_cls_register($tor_chk_cls)) == FALSE) { + fprintf(STDERR, "MAIN: 'tor_chk_cls' registration failed\n"); exit(1); } - $s_a_p->run(); + pid_save(); + do { + if (($brisk = Brisk::create(LEGAL_PATH."/brisk-crystal.data", $G_ban_list, $G_black_list)) == FALSE) { + log_crit("Brisk::create failed"); + $ret = 1; + break; + } + + if (($s_a_p = Sac_a_push::create($brisk, USOCK_PATH, 0, 0, $argv)) === FALSE) { + $ret = 2; + break; + } + + $ret = $s_a_p->run(); + } while (0); - exit(0); + pid_remove(); + exit($ret); } -main(); +main($argv); ?>