coding standards + choose correct streamhost when we receive the streamhost_used after we sent it
This commit is contained in:
parent
a3d772e505
commit
e49a48d7da
|
@ -192,7 +192,7 @@ class JingleFileTransfer(JingleContent):
|
|||
if self.state == STATE_CAND_SENT_PENDING_REPLY:
|
||||
response = stanza.buildReply('result')
|
||||
self.session.connection.connection.send(response)
|
||||
self.start_transfer(streamhost_used)
|
||||
self.start_transfer()
|
||||
raise xmpp.NodeProcessed
|
||||
else:
|
||||
self.state = STATE_CAND_RECEIVED_PENDING_REPLY
|
||||
|
@ -230,7 +230,6 @@ class JingleFileTransfer(JingleContent):
|
|||
# proxy activated
|
||||
self.state = STATE_PROXY_ACTIVATED
|
||||
elif self.state == STATE_CAND_SENT_AND_RECEIVED:
|
||||
|
||||
if not self.nominated_cand['our-cand'] and \
|
||||
not self.nominated_cand['peer-cand']:
|
||||
if not self.weinitiate:
|
||||
|
@ -238,7 +237,7 @@ class JingleFileTransfer(JingleContent):
|
|||
self.session.transport_replace()
|
||||
return
|
||||
# initiate transfer
|
||||
self.start_transfer(None)
|
||||
self.start_transfer()
|
||||
|
||||
def send_candidate_used(self, streamhost):
|
||||
"""
|
||||
|
@ -361,7 +360,7 @@ class JingleFileTransfer(JingleContent):
|
|||
return self.weinitiate
|
||||
|
||||
|
||||
def start_transfer(self, streamhost_used):
|
||||
def start_transfer(self):
|
||||
|
||||
self.state = STATE_TRANSFERING
|
||||
|
||||
|
@ -370,8 +369,10 @@ class JingleFileTransfer(JingleContent):
|
|||
|
||||
if self.isOurCandUsed():
|
||||
type = 'client'
|
||||
streamhost_used = self.nominated_cand['our-cand']
|
||||
else:
|
||||
type = 'server'
|
||||
streamhost_used = self.nominated_cand['peer-cand']
|
||||
|
||||
# FIXME if streamhost_used is none where do we get the proxy host
|
||||
if streamhost_used and streamhost_used['type'] == 'proxy':
|
||||
|
|
Loading…
Reference in New Issue