X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fspush%2Fbrisk-spush.php;h=6e07d92b4545f5d4b14c94f1a58436e6eb1e6501;hb=90a3af6cf232fa9b77270f38eb8d766b3bb3ac23;hp=e7d5f85873d789299ac732bc4772755206889786;hpb=d951bcaafbc7f0f091879d6f47043492534d2d08;p=brisk.git diff --git a/web/spush/brisk-spush.php b/web/spush/brisk-spush.php index e7d5f85..6e07d92 100755 --- a/web/spush/brisk-spush.php +++ b/web/spush/brisk-spush.php @@ -28,10 +28,11 @@ $G_base = "../"; require_once($G_base."Obj/sac-a-push.phh"); require_once("./brisk-spush.phh"); require_once($G_base."Obj/user.phh"); +@include_once($G_base."Obj/curl-de-brisk.phh"); require_once($G_base."Obj/brisk.phh"); require_once($G_base."Obj/auth.phh"); require_once($G_base."Obj/zlibstream.phh"); -// require_once("../Obj/proxyscan.phh"); +require_once($G_base."Obj/mail.phh"); require_once($G_base."index.php"); require_once($G_base."index_wr.php"); require_once($G_base."briskin5/Obj/briskin5.phh"); @@ -39,21 +40,29 @@ require_once($G_base."briskin5/index.php"); require_once($G_base."briskin5/index_wr.php"); -function main() +function main($argv) { - if (($room = Room::create()) == FALSE) { - log_crit("room::create failed"); - exit(1); - } + GLOBAL $G_ban_list, $G_black_list; - if (($s_a_p = Sac_a_push::create($room, "/tmp/brisk.sock", 0, 0)) === FALSE) { - exit(1); - } + 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; + } - $s_a_p->run(); + if (($s_a_p = Sac_a_push::create($brisk, USOCK_PATH, 0, 0, $argv)) === FALSE) { + $ret = 2; + break; + } - exit(0); + $ret = $s_a_p->run(); + } while (0); + + pid_remove(); + exit($ret); } -main(); +main($argv); ?>