Skip to content
Permalink
Browse files

webui: Fixed always active debug messages in error.log

Fixes #1059: Webui spams Apache error_log with bconsole messages
  • Loading branch information...
astoorangi committed Jul 8, 2019
1 parent e940e01 commit 8fd7e899030d6ef25b1d1819b41ddce8f3ca5621
@@ -88,7 +88,7 @@ public function loginAction()
$this->bsock = $this->getServiceLocator()->get('director');
$this->bsock->set_config($config['directors'][$director]);
$this->bsock->set_user_credentials($username, $password);
error_log($username);
//error_log($username);
if($this->bsock->connect_and_authenticate()) {
$_SESSION['bareos']['director'] = $director;
@@ -460,7 +460,9 @@ private function connect()
return false;
}
error_log("console_name: ".$this->config['console_name']);
if($this->config['debug']) {
error_log("console_name: ".$this->config['console_name']);
}
$port = $this->config['port'];
$remote = "tcp://" . $this->config['host'] . ":" . $port;
@@ -581,13 +583,17 @@ private function connect()
return false;
}
$recv = self::receive();
error_log($recv);
if($this->config['debug']) {
error_log($recv);
}
}
if (!strncasecmp($recv, "1000", 4)) {
$recv = self::receive();
error_log($recv);
return true;
$recv = self::receive();
if($this->config['debug']) {
error_log($recv);
}
return true;
}
return false;

0 comments on commit 8fd7e89

Please sign in to comment.
You can’t perform that action at this time.