Make config instantiation private
Fixup Paths Moved all tests to phpunit tests Signed-off-by: Diederik de Groot <ddegroot@talon.nl>
This commit is contained in:
@@ -23,7 +23,7 @@ class TFTPProvisioner extends TFTP\TFTPServer
|
||||
parent::__construct($server_url, $logger);
|
||||
$this->_debug = $debug;
|
||||
$this->max_put_size = 60000000;
|
||||
$this->_resolve = new Resolve\Resolver($config);
|
||||
$this->_resolve = new Resolve\Resolve($config);
|
||||
$this->_settings_path = $this->_config['main']['base_path'] . DIRECTORY_SEPARATOR
|
||||
. $this->_config['subdirs']['settings']['path'] . DIRECTORY_SEPARATOR;
|
||||
}
|
||||
@@ -83,12 +83,14 @@ class TFTPProvisioner extends TFTP\TFTPServer
|
||||
|
||||
}
|
||||
|
||||
global $base_path;
|
||||
$host = "127.0.0.1";
|
||||
$port = 10069;
|
||||
$url = "udp://$host:$port";
|
||||
|
||||
echo "\nStarting TFTP Provisioner...\n";
|
||||
$server = new TFTPProvisioner($url, $config, $logger);
|
||||
$configParser = new SCCP\Config\ConfigParser($base_path, "config.ini");
|
||||
$server = new TFTPProvisioner($url, $configParser->getConfiguration(), $logger);
|
||||
if(!$server->loop($error))
|
||||
die("$error\n");
|
||||
?>
|
||||
|
Reference in New Issue
Block a user