]> p2p-next.cs.pub.ro Git - cs-p2p-next.git/commitdiff
autorun: updated server message for GET_STATUS
authorAdriana Draghici <adriana008@gmail.com>
Fri, 30 Apr 2010 09:04:51 +0000 (09:04 +0000)
committerAdriana Draghici <adriana008@gmail.com>
Fri, 30 Apr 2010 09:04:51 +0000 (09:04 +0000)
autorun/server/Server.py

index a4ce33c4d72ec0b539b6ad2f7d519816223ae827..8608d3125ff93f2f7985c0b43c7a4331a6a36773 100644 (file)
@@ -321,14 +321,14 @@ class MyDaemon(Daemon):
                 err_msg = self.get_client_status(msg[1], line_parts)
                 response = {}
                 print len(line_parts) 
-                if len(line_parts[0]) >= 6:
-                    #response[TIMESTAMP] = line_parts[0]
-                    response[NUM_PEERS] = line_parts[0][0]
-                    response[DHT] = line_parts[0][1]
-                    response[DL_SPEED] = line_parts[0][2]
-                    response[UP_SPEED] = line_parts[0][3]
-                    response[DL_SIZE] = line_parts[0][4]
-                    response[ETA] = line_parts[0][5]
+                if len(line_parts[0]) >= 7:
+                    response[TIMESTAMP] = line_parts[0][0]
+                    response[NUM_PEERS] = line_parts[0][1]
+                    response[DHT] = line_parts[0][2]
+                    response[DL_SPEED] = line_parts[0][3]
+                    response[UP_SPEED] = line_parts[0][4]
+                    response[DL_SIZE] = line_parts[0][5]
+                    response[ETA] = line_parts[0][6]
             
             else:
                 err_msg = "Error: wrong message type";