Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
Merge pull request #67 from toerb/master
Browse files Browse the repository at this point in the history
add simple catalog handling
  • Loading branch information
fbergkemper committed Jul 14, 2016
2 parents fe68ddb + 94d4d4d commit f1b9048
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions config/autoload/global.php
Expand Up @@ -134,6 +134,13 @@ function read_dir_config($config, $file)
$arr[key($config)]['allowed_cns'] = "";
}

if(array_key_exists('catalog', $instance) && isset($instance['catalog'])) {
$arr[key($config)]['catalog'] = $instance['catalog'];
}
else {
$arr[key($config)]['catalog'] = "MyCatalog";
}

}

next($config);
Expand Down
3 changes: 2 additions & 1 deletion vendor/Bareos/library/Bareos/BSock/BareosBSock.php
Expand Up @@ -78,6 +78,7 @@ class BareosBSock implements BareosBSockInterface
'cert_file' => null,
'cert_file_passphrase' => null,
'allowed_cns' => null,
'catalog' => null,
);

private $socket = null;
Expand Down Expand Up @@ -870,7 +871,7 @@ public function send_command($cmd, $api=0, $jobid=null)
break;
}

if(self::send("use")) {
if(self::send("use catalog=" . $this->config['catalog'])) {
$debug = self::receive_message();
}

Expand Down

0 comments on commit f1b9048

Please sign in to comment.