Browse Source

Fix more regressions

master
Maurizio Porrato 8 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):
('SV', versions.server),
('CV', versions.client),
('MC', versions.manager),
# ('AL', res['al']),
('AL', res),
('KP', self.kp)
]))

+ 6
- 6
parrot.py View File

@@ -27,7 +27,7 @@ class FRNParrot(FRNClient):

def getClientName(self, client_id):
if self.clientsById.has_key(client_id):
return self.clientsById[client_id]['on']
return self.clientsById[client_id]['ON']
else:
return client_id

@@ -64,11 +64,11 @@ class FRNParrot(FRNClient):

def startRepeating(self, from_id):
log.msg("%s stopped talking: starting playback." %
self.clients[from_id-1]['on'])
self.clients[from_id-1]['ON'])
self.startStreaming()

def audioFrameReceived(self, from_id, frames):
recname = sanitizeFilename(self.clients[from_id-1]['on'])
recname = sanitizeFilename(self.clients[from_id-1]['ON'])
with file('recordings/%s.gsm' % recname, 'ab') as f:
f.write(frames)
self.feedStreaming(frames)
@@ -76,17 +76,17 @@ class FRNParrot(FRNClient):
self.parrot_timer.reset(PARROT_AUDIO_DELAY)
except:
log.msg("%s started talking" %
self.clients[from_id-1]['on'])
self.clients[from_id-1]['ON'])
self.parrot_timer = self.factory.reactor.callLater(
PARROT_AUDIO_DELAY, self.startRepeating, from_id)
self.pong()

def loginResponse(self, info):
log.msg("Login: %s" % info['al'])
log.msg("Login: %s" % info['AL'])

def clientsListUpdated(self, clients):
self.clients = clients
self.clientsById = dict([(i['id'], i) for i in clients])
self.clientsById = dict([(i['ID'], i) for i in clients])


class FRNParrotFactory(FRNClientFactory):

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

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

Loading…
Cancel
Save