From 31ae1ff758567f77e37c4c6ced3e07161240bd3f Mon Sep 17 00:00:00 2001 From: Marius Sandu-Popa Date: Fri, 5 Feb 2010 22:04:42 +0200 Subject: [PATCH] updated commander --- bt_comm/client/Client.py | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/bt_comm/client/Client.py b/bt_comm/client/Client.py index 57c3e1f..02719f3 100644 --- a/bt_comm/client/Client.py +++ b/bt_comm/client/Client.py @@ -90,13 +90,20 @@ class Commander(Thread): node = self.nodes.getNodeBySi(si) base_path = node.getClientBaseDir(si.btclient) torrent_file = self.swarm.getTorrentFile() - config_data = [{'client':si.btclient, - 'base_path':base_path, - 'download_dir':si.download_dir, - 'log_dir':si.log_dir, - 'torrent_file':torrent_file, - 'output_dir':si.output_dir, }] - self.printDummyCommand(node.public_address, node.public_port, START_MSG, config_data) + + config_data = {CLIENT : si.btclient, + BASE_DIR : base_path, + UP_LIMIT : si.download_limit, + DL_LIMIT : si.upload_limit, + PORT : node.public_port, + DL_DIR : si.download_dir, + LOG_DIR : si.log_dir, + OUT_FILE : si.output_file, + LOG_FILE : si.log_file, + TORRENT : torrent_file + } + + self.printDummyCommand(node.public_address, node.listen_port, START_MSG, config_data) #sendComm(node.public_address, node.public_port, START_MSG, config_data) def printDummyCommand(self, public_address, public_port, option1, data): -- 2.20.1