]>
Commit | Line | Data |
---|---|---|
bfce6709 | 1 | --- pymsn-t/src/legacy/glue.py 2008-09-19 10:53:30.000000000 +0200 |
2 | +++ pymsn-t/src/legacy/glue.py 2008-09-19 10:52:38.000000000 +0200 | |
3 | @@ -379,7 +379,13 @@ | |
4 | self.session.removeMe() | |
5 | ||
6 | def connectionLost(self, reason): | |
7 | - LogEvent(INFO, self.jabberID) | |
8 | + LogEvent(INFO, self.jabberID) | |
9 | + # If we got a second referral, don't really log out but let the next NS | |
10 | + # try to log us in | |
11 | + if reason.type == error.ConnectionDone and self.gotadditionalXFR != 0: | |
12 | + LogEvent(INFO, self.ident) | |
13 | + self.gotadditionalXFR = 0 | |
14 | + return | |
15 | if reason.type != error.ConnectionDone: | |
16 | text = lang.get(self.session.lang).msnDisconnected % reason | |
17 | self.session.sendMessage(to=self.jabberID, fro=config.jid, body=text) | |
18 | --- pymsn-t/src/legacy/msn/msn.py 2008-09-19 10:53:30.000000000 +0200 | |
19 | +++ pymsn-t/src/legacy/msn/msn.py 2008-09-19 10:52:38.000000000 +0200 | |
20 | @@ -1347,7 +1347,9 @@ | |
21 | port = MSN_PORT | |
22 | ||
23 | if not self._fireCallback(id, host, int(port), params[4]): | |
24 | - raise MSNProtocolError, "Got XFR (referral) that I didn't ask for .. should this happen?" # debug | |
25 | + #raise MSNProtocolError, "Got XFR (referral) that I didn't ask for .. should this happen?" # debug | |
26 | + self.factory.msncon.gotadditionalXFR = 1 | |
27 | + self.factory.msncon.connectors.append(reactor.connectTCP(host, int(port), self.factory, bindAddress=(self.factory.msncon.BINDADDRESS, 0))) | |
28 | ||
29 | def handle_RNG(self, params): | |
30 | checkParamLen(len(params), 6, 'RNG') | |
31 | --- pymsn-t/src/legacy/msn/msnw.py 2008-09-19 10:53:30.000000000 +0200 | |
32 | +++ pymsn-t/src/legacy/msn/msnw.py 2008-09-19 10:52:38.000000000 +0200 | |
33 | @@ -67,8 +67,9 @@ | |
34 | LogEvent(INFO, self.ident) | |
35 | ||
36 | def _gotNotificationReferral(self, (host, port)): | |
37 | - self.timeout.cancel() | |
38 | - self.timeout = None | |
39 | + if self.timeout != None: | |
40 | + self.timeout.cancel() | |
41 | + self.timeout = None | |
42 | # Create the NotificationClient | |
43 | self.notificationFactory = msn.NotificationFactory() | |
44 | self.notificationFactory.userHandle = self.username |