diff options
| author | Kali Kaneko <kali@leap.se> | 2013-10-30 16:23:31 -0200 | 
|---|---|---|
| committer | Kali Kaneko <kali@leap.se> | 2013-10-30 16:23:31 -0200 | 
| commit | 21a9fd702bdeb4f8edd57535df32d946152a510c (patch) | |
| tree | fb5a92ac7f68e4f33eb953f977d270cb83d73df3 /mail/src | |
| parent | 526754b3a3989bf1e33d0c2fa6352e0a0ac92e5c (diff) | |
| parent | c2e69a3696893b15100c2eb8fe3404e40e4b16a8 (diff) | |
Merge remote-tracking branch 'chiiph/bug/imap_return_factory_and_port' into develop
Diffstat (limited to 'mail/src')
| -rw-r--r-- | mail/src/leap/mail/imap/service/imap.py | 10 | 
1 files changed, 6 insertions, 4 deletions
| diff --git a/mail/src/leap/mail/imap/service/imap.py b/mail/src/leap/mail/imap/service/imap.py index b840e86..b641d2e 100644 --- a/mail/src/leap/mail/imap/service/imap.py +++ b/mail/src/leap/mail/imap/service/imap.py @@ -141,7 +141,9 @@ def run_service(*args, **kwargs):      Main entry point to run the service from the client.      :returns: the LoopingCall instance that will have to be stoppped -              before shutting down the client. +              before shutting down the client, the port as returned by +              the reactor when starts listening, and the factory for +              the protocol.      """      leap_assert(len(args) == 2)      soledad, keymanager = args @@ -157,8 +159,8 @@ def run_service(*args, **kwargs):      from twisted.internet import reactor      try: -        reactor.listenTCP(port, factory, -                          interface="localhost") +        tport = reactor.listenTCP(port, factory, +                                 interface="localhost")          fetcher = LeapIncomingMail(              keymanager,              soledad, @@ -174,7 +176,7 @@ def run_service(*args, **kwargs):          fetcher.start_loop()          logger.debug("IMAP4 Server is RUNNING in port  %s" % (port,))          leap_events.signal(IMAP_SERVICE_STARTED, str(port)) -        return fetcher +        return fetcher, tport, factory      # not ok, signal error.      leap_events.signal(IMAP_SERVICE_FAILED_TO_START, str(port)) | 
