X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fspush%2Fbrisk-spush.php;h=5a318dcfa68e84ea1e25c9d02848a5ebc8c92bab;hb=1a1f50c83244ae2808cc9126296c8918bd0516a4;hp=af0881dc1c56fd0853eb6b462ab610e81a25df03;hpb=2ffd82cec38361624bb52a435ef5bd5b1c067af7;p=brisk.git diff --git a/web/spush/brisk-spush.php b/web/spush/brisk-spush.php index af0881d..5a318dc 100755 --- a/web/spush/brisk-spush.php +++ b/web/spush/brisk-spush.php @@ -31,6 +31,7 @@ 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("../Obj/proxyscan.phh"); require_once($G_base."index.php"); require_once($G_base."index_wr.php"); @@ -39,21 +40,27 @@ 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); - } + pid_save(); + do { + if (($brisk = Brisk::create(LEGAL_PATH."/brisk-crystal.data")) == FALSE) { + log_crit("Brisk::create failed"); + $ret = 1; + break; + } - if (($s_a_p = Sac_a_push::create($room, USOCK_PATH, 0, 0)) === FALSE) { - exit(1); - } + if (($s_a_p = Sac_a_push::create($brisk, USOCK_PATH, 0, 0, $argv)) === FALSE) { + $ret = 2; + break; + } - $s_a_p->run(); + $ret = $s_a_p->run(); + } while (0); - exit(0); + pid_remove(); + exit($ret); } -main(); +main($argv); ?>