Fix more regressions
This commit is contained in:
parent
17eb5f0ca3
commit
8def852a98
|
@ -182,7 +182,6 @@ class FRNManagerServer(LineOnlyReceiver):
|
||||||
('SV', versions.server),
|
('SV', versions.server),
|
||||||
('CV', versions.client),
|
('CV', versions.client),
|
||||||
('MC', versions.manager),
|
('MC', versions.manager),
|
||||||
# ('AL', res['al']),
|
|
||||||
('AL', res),
|
('AL', res),
|
||||||
('KP', self.kp)
|
('KP', self.kp)
|
||||||
]))
|
]))
|
||||||
|
|
12
parrot.py
12
parrot.py
|
@ -27,7 +27,7 @@ class FRNParrot(FRNClient):
|
||||||
|
|
||||||
def getClientName(self, client_id):
|
def getClientName(self, client_id):
|
||||||
if self.clientsById.has_key(client_id):
|
if self.clientsById.has_key(client_id):
|
||||||
return self.clientsById[client_id]['on']
|
return self.clientsById[client_id]['ON']
|
||||||
else:
|
else:
|
||||||
return client_id
|
return client_id
|
||||||
|
|
||||||
|
@ -64,11 +64,11 @@ class FRNParrot(FRNClient):
|
||||||
|
|
||||||
def startRepeating(self, from_id):
|
def startRepeating(self, from_id):
|
||||||
log.msg("%s stopped talking: starting playback." %
|
log.msg("%s stopped talking: starting playback." %
|
||||||
self.clients[from_id-1]['on'])
|
self.clients[from_id-1]['ON'])
|
||||||
self.startStreaming()
|
self.startStreaming()
|
||||||
|
|
||||||
def audioFrameReceived(self, from_id, frames):
|
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:
|
with file('recordings/%s.gsm' % recname, 'ab') as f:
|
||||||
f.write(frames)
|
f.write(frames)
|
||||||
self.feedStreaming(frames)
|
self.feedStreaming(frames)
|
||||||
|
@ -76,17 +76,17 @@ class FRNParrot(FRNClient):
|
||||||
self.parrot_timer.reset(PARROT_AUDIO_DELAY)
|
self.parrot_timer.reset(PARROT_AUDIO_DELAY)
|
||||||
except:
|
except:
|
||||||
log.msg("%s started talking" %
|
log.msg("%s started talking" %
|
||||||
self.clients[from_id-1]['on'])
|
self.clients[from_id-1]['ON'])
|
||||||
self.parrot_timer = self.factory.reactor.callLater(
|
self.parrot_timer = self.factory.reactor.callLater(
|
||||||
PARROT_AUDIO_DELAY, self.startRepeating, from_id)
|
PARROT_AUDIO_DELAY, self.startRepeating, from_id)
|
||||||
self.pong()
|
self.pong()
|
||||||
|
|
||||||
def loginResponse(self, info):
|
def loginResponse(self, info):
|
||||||
log.msg("Login: %s" % info['al'])
|
log.msg("Login: %s" % info['AL'])
|
||||||
|
|
||||||
def clientsListUpdated(self, clients):
|
def clientsListUpdated(self, clients):
|
||||||
self.clients = 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):
|
class FRNParrotFactory(FRNClientFactory):
|
||||||
|
|
|
@ -110,7 +110,7 @@ class FRNCrosslinkClient(FRNClient):
|
||||||
for _, _, _, factory in clients:
|
for _, _, _, factory in clients:
|
||||||
conn = factory.connection
|
conn = factory.connection
|
||||||
if conn != self:
|
if conn != self:
|
||||||
role = conn.serverdata.get('al', None)
|
role = conn.serverdata.get('AL', None)
|
||||||
if role in ['OK', 'ADMIN', 'OWNER']:
|
if role in ['OK', 'ADMIN', 'OWNER']:
|
||||||
if conn.txOk:
|
if conn.txOk:
|
||||||
conn.txReq = False
|
conn.txReq = False
|
||||||
|
|
Loading…
Reference in New Issue