summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuda Dornelles <dudassdornelles@gmail.com>2015-01-12 15:32:16 -0200
committerIvan Alejandro <ivanalejandro0@gmail.com>2015-04-01 17:05:05 -0300
commitae3d99c4ddf94c2d2d055ce8f96afc1f2b2e6e8f (patch)
tree5aa3fac1dab5095025ebcc5730967c96aa809e2a
parent3cb7948dafe3a9c9a65dcdbd1da1d5405e1ef459 (diff)
[bug] Use less threads.
On SRP#authenticate, no need to use so many threads.
-rw-r--r--src/leap/bitmask/crypto/srpauth.py20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/leap/bitmask/crypto/srpauth.py b/src/leap/bitmask/crypto/srpauth.py
index c2a5f158..f679430b 100644
--- a/src/leap/bitmask/crypto/srpauth.py
+++ b/src/leap/bitmask/crypto/srpauth.py
@@ -562,7 +562,7 @@ class SRPAuth(object):
self._reset_session()
# FIXME ---------------------------------------------------------
- # 1. it makes no sense to defer each callback to a thread
+ # 1. it makes no sense to defer each callback to a thread - DONE
# 2. the decision to use threads should be at another level.
# (although it's not really needed, that was a hack around
# the gui blocks)
@@ -573,20 +573,10 @@ class SRPAuth(object):
username=username,
password=password)
- d.addCallback(
- partial(self._threader,
- self._start_authentication),
- username=username)
- d.addCallback(
- partial(self._threader,
- self._process_challenge),
- username=username)
- d.addCallback(
- partial(self._threader,
- self._extract_data))
- d.addCallback(partial(self._threader,
- self._verify_session))
-
+ d.addCallback(partial(self._start_authentication, username=username))
+ d.addCallback(partial(self._process_challenge, username=username))
+ d.addCallback(self._extract_data)
+ d.addCallback(self._verify_session)
d.addCallback(self._authenticate_ok)
d.addErrback(self._authenticate_error)
return d