summaryrefslogtreecommitdiff
path: root/src/leap/mail/imap
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/mail/imap')
-rw-r--r--src/leap/mail/imap/server.py4
-rw-r--r--src/leap/mail/imap/service/imap.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/leap/mail/imap/server.py b/src/leap/mail/imap/server.py
index 39f483f..8f14936 100644
--- a/src/leap/mail/imap/server.py
+++ b/src/leap/mail/imap/server.py
@@ -27,7 +27,7 @@ from twisted.mail import imap4
from twisted.python import log
from leap.common.check import leap_assert, leap_assert_type
-from leap.common.events import emit, catalog
+from leap.common.events import emit_async, catalog
from leap.soledad.client import Soledad
# imports for LITERAL+ patch
@@ -224,7 +224,7 @@ class LEAPIMAPServer(imap4.IMAP4Server):
# bad username, reject.
raise cred.error.UnauthorizedLogin()
# any dummy password is allowed so far. use realm instead!
- emit(catalog.IMAP_CLIENT_LOGIN, "1")
+ emit_async(catalog.IMAP_CLIENT_LOGIN, "1")
return imap4.IAccount, self.theAccount, lambda: None
def do_FETCH(self, tag, messages, query, uid=0):
diff --git a/src/leap/mail/imap/service/imap.py b/src/leap/mail/imap/service/imap.py
index c3ae59a..cd31edf 100644
--- a/src/leap/mail/imap/service/imap.py
+++ b/src/leap/mail/imap/service/imap.py
@@ -28,7 +28,7 @@ from twisted.internet.protocol import ServerFactory
from twisted.mail import imap4
from twisted.python import log
-from leap.common.events import emit, catalog
+from leap.common.events import emit_async, catalog
from leap.common.check import leap_check
from leap.mail.imap.account import IMAPAccount
from leap.mail.imap.server import LEAPIMAPServer
@@ -178,10 +178,10 @@ def run_service(store, **kwargs):
reactor.listenTCP(manhole.MANHOLE_PORT, manhole_factory,
interface="127.0.0.1")
logger.debug("IMAP4 Server is RUNNING in port %s" % (port,))
- emit(catalog.IMAP_SERVICE_STARTED, str(port))
+ emit_async(catalog.IMAP_SERVICE_STARTED, str(port))
# FIXME -- change service signature
return tport, factory
# not ok, signal error.
- emit(catalog.IMAP_SERVICE_FAILED_TO_START, str(port))
+ emit_async(catalog.IMAP_SERVICE_FAILED_TO_START, str(port))