Skip to content

Commit

Permalink
webui: Fixed always active debug messages in error.log
Browse files Browse the repository at this point in the history
Fixes #1059: Webui spams Apache error_log with bconsole messages
  • Loading branch information
astoorangi committed Jul 8, 2019
1 parent e940e01 commit 8fd7e89
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion webui/module/Auth/src/Auth/Controller/AuthController.php
Expand Up @@ -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;
Expand Down
16 changes: 11 additions & 5 deletions webui/vendor/Bareos/library/Bareos/BSock/BareosBSock.php
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 8fd7e89

Please sign in to comment.