]> p2p-next.cs.pub.ro Git - cs-p2p-next.git/commitdiff
autorun: fixed smth in TransmissionRun
authorAdriana Draghici <adriana008@gmail.com>
Sat, 10 Apr 2010 14:10:08 +0000 (14:10 +0000)
committerAdriana Draghici <adriana008@gmail.com>
Sat, 10 Apr 2010 14:10:36 +0000 (14:10 +0000)
autorun/server/BitTorrentClientRun.py
autorun/server/Client.py
autorun/server/Server.py
autorun/server/TransmissionRun.py

index 935c19ddfe14444477f44ddde5c53384b671d23e..5687ceb136546a8a4223033648b48bb81617c273 100644 (file)
@@ -73,6 +73,10 @@ class BitTorrentClientRun:
         
         log_redirect = open(self.log_dir+"/"+self.log_file,"w")
         output_redirect = open(self.output_dir+"/"+self.output_file,"w")
+        if(DEBUG):
+            print "output redirect to file ", (self.output_dir+"/"+self.output_file)
+            print "log redirect to file ", (self.log_dir+"/"+self.log_file)
+        
         p=subprocess.Popen(args, shell=False, #does not create sh process
                             stdout=log_redirect,
                             stderr=output_redirect)
index ae461cf4634f8e3393e95864bb172430d911d040..943bdc305b5169fab4d4d5b8453bc3fe07a16d7d 100644 (file)
@@ -65,7 +65,7 @@ def test_all_commands(torrent_file):
             }
     start_data_transmission = {
             CLIENT: TRANSMISSION, PORT:10250,
-            BASE_DIR:"/usr/bin/",
+            BASE_DIR:"/usr/bin",
             TORRENT: "/home/p2p/p2p-meta/" + torrent_name+".torrent",
             DL_DIR: "/home/p2p/p2p-dld/transmission",
             LOG_DIR: "/home/p2p/p2p-log/transmission",
@@ -85,7 +85,7 @@ def test_all_commands(torrent_file):
 
 
             }
-    response = s.send_command(START_MSG, start_data_tribler)
+    response = s.send_command(START_MSG, start_data_transmission)
     print response
     pid = (response.split(" "))[1]
     print pid
index 99766138c62cfa34cb1a0973f17315bdce7568b5..6ac9bd3e178516f84e3ea38c2fa5a4863a72d1c3 100644 (file)
@@ -20,7 +20,7 @@ class MyDaemon(Daemon):
     BUFFER_SIZE = 4096
 
     states = {} # keeps track of what kind of message was previously receveid on a socket.
-    processes = {}
+    processes = {} # keeps lists of file descriptors for each process
     WAITING_MSG_TYPE = 0
     WAITING_START_DATA = 3
     WAITING_STOP_DATA = 4
index a1953a54452f5830069b7e935468383e7063d532..e58d82b7fbfa662935ee21f019184636413f577b 100644 (file)
@@ -15,7 +15,7 @@ DEBUG = False
 class TransmissionRun(BitTorrentClientRun):
     def __init__(self, base_path):
         BitTorrentClientRun.__init__(self, base_path,
-                "$base_path/transmission --download-dir $download_dir --port $port $torrent_file > $output_dir/$output_file", 
+                "$base_path/transmissioncli --download-dir $download_dir --port $port $torrent_file > $output_dir/$output_file", 
                 "TR_DEBUG=2 $base_path/transmission --download-dir $download_dir --port $port $torrent_file 2> $log_dir/$log_file > $output_dir/$output_file")