From: Marius Sandu-Popa Date: Fri, 5 Feb 2010 20:04:42 +0000 (+0200) Subject: updated commander X-Git-Tag: getopt_long~178 X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=31ae1ff758567f77e37c4c6ced3e07161240bd3f;p=cs-p2p-next.git updated commander --- 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):