Broken announcer fix, announcer debug removed.

This commit is contained in:
Yuriy Pikhtarev 2017-08-07 00:30:28 +03:00
commit 9aba4d0d59
No known key found for this signature in database
GPG key ID: 3A9B5A757B48ECC6
11 changed files with 9 additions and 109 deletions

View file

@ -37,45 +37,18 @@ if ($bb_cfg['tracker']['off']) {
//
// Functions
//
function tracker_exit()
{
global $DBS;
if (DBG_LOG && DBG_TRACKER) {
if ($gen_time = utime() - TIMESTART) {
$sql_init_perc = round($DBS->sql_inittime * 100 / $gen_time);
$sql_total_perc = round($DBS->sql_timetotal * 100 / $gen_time);
$str = array();
$str[] = substr(TIMENOW, -4, 4);
$str[] = sprintf('%.4f', $gen_time);
$str[] = sprintf('%.4f' . LOG_SEPR . '%02d%%', $DBS->sql_inittime, $sql_init_perc);
$str[] = sprintf('%.4f' . LOG_SEPR . '%02d%%', $DBS->sql_timetotal, $sql_total_perc);
$str[] = $DBS->num_queries;
$str[] = sprintf('%.1f', sys('la'));
$str = implode(LOG_SEPR, $str) . LOG_LF;
dbg_log($str, '!!gentime');
}
}
exit;
}
function silent_exit()
{
ob_end_clean();
tracker_exit();
exit;
}
function error_exit($msg = '')
{
if (DBG_LOG) {
dbg_log(' ', '!err-' . clean_filename($msg));
}
silent_exit();
echo \Rych\Bencode\Bencode::encode(['failure reason' => str_compact($msg)]);
tracker_exit();
exit;
}