Browse Source

Fix more regressions

Maurizio Porrato 7 years ago
parent
commit
8def852a98
3 changed files with 7 additions and 8 deletions
  1. 0
    1
      frn/protocol/manager.py
  2. 6
    6
      parrot.py
  3. 1
    1
      twisted/plugins/frncrosslink.py

+ 0
- 1
frn/protocol/manager.py View File

@@ -182,7 +182,6 @@ class FRNManagerServer(LineOnlyReceiver):
182 182
                 ('SV', versions.server),
183 183
                 ('CV', versions.client),
184 184
                 ('MC', versions.manager),
185
-#                ('AL', res['al']),
186 185
                 ('AL', res),
187 186
                 ('KP', self.kp)
188 187
             ]))

+ 6
- 6
parrot.py View File

@@ -27,7 +27,7 @@ class FRNParrot(FRNClient):
27 27
 
28 28
     def getClientName(self, client_id):
29 29
         if self.clientsById.has_key(client_id):
30
-            return self.clientsById[client_id]['on']
30
+            return self.clientsById[client_id]['ON']
31 31
         else:
32 32
             return client_id
33 33
 
@@ -64,11 +64,11 @@ class FRNParrot(FRNClient):
64 64
 
65 65
     def startRepeating(self, from_id):
66 66
         log.msg("%s stopped talking: starting playback." %
67
-            self.clients[from_id-1]['on'])
67
+            self.clients[from_id-1]['ON'])
68 68
         self.startStreaming()
69 69
 
70 70
     def audioFrameReceived(self, from_id, frames):
71
-        recname = sanitizeFilename(self.clients[from_id-1]['on'])
71
+        recname = sanitizeFilename(self.clients[from_id-1]['ON'])
72 72
         with file('recordings/%s.gsm' % recname, 'ab') as f:
73 73
             f.write(frames)
74 74
         self.feedStreaming(frames)
@@ -76,17 +76,17 @@ class FRNParrot(FRNClient):
76 76
             self.parrot_timer.reset(PARROT_AUDIO_DELAY)
77 77
         except:
78 78
             log.msg("%s started talking" %
79
-                self.clients[from_id-1]['on'])
79
+                self.clients[from_id-1]['ON'])
80 80
             self.parrot_timer = self.factory.reactor.callLater(
81 81
                 PARROT_AUDIO_DELAY, self.startRepeating, from_id)
82 82
         self.pong()
83 83
 
84 84
     def loginResponse(self, info):
85
-        log.msg("Login: %s" % info['al'])
85
+        log.msg("Login: %s" % info['AL'])
86 86
 
87 87
     def clientsListUpdated(self, clients):
88 88
         self.clients = clients
89
-        self.clientsById = dict([(i['id'], i) for i in clients])
89
+        self.clientsById = dict([(i['ID'], i) for i in clients])
90 90
 
91 91
 
92 92
 class FRNParrotFactory(FRNClientFactory):

+ 1
- 1
twisted/plugins/frncrosslink.py View File

@@ -110,7 +110,7 @@ class FRNCrosslinkClient(FRNClient):
110 110
             for _, _, _, factory in clients:
111 111
                 conn = factory.connection
112 112
                 if conn != self:
113
-                    role = conn.serverdata.get('al', None)
113
+                    role = conn.serverdata.get('AL', None)
114 114
                     if role in ['OK', 'ADMIN', 'OWNER']:
115 115
                         if conn.txOk:
116 116
                             conn.txReq = False

Loading…
Cancel
Save