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 authored and fbergkemper committed Jul 8, 2019
1 parent d145c8e commit 3b10065bfe86a58d0113f3b4264e3dcda67a2efc
@@ -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 3b10065

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