> 
> Ok. I've hopefully fixed the errors in that debug log, as 
> well as making it so that the switchboard session will notice 
> the disocnnection correctly.
> 
> Please check out current SVN and give it a shot.
> 

Yes it works now, even if the download.php links get dropped the next
message gets delivered like it should. The only thing now would be a
message, but since MSN does not give this we are at a loss I guess. 

At least the issue is resolved! :)

-stian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4490 bytes
Desc: not available
Url : 
http://modevia.com/pipermail/py-transports/attachments/20060615/9475d3db/smime-0001.bin
From [EMAIL PROTECTED]  Thu Jun 15 09:34:58 2006
From: [EMAIL PROTECTED] (Stian B. Barmen)
Date: Thu Jun 15 09:35:04 2006
Subject: [py-transports] very high load using pymsnt latest SVN for ~30s
In-Reply-To: <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>

> 
> 
> If anybody sees this again, or can find steps to reproduce 
> it, or has any clues  what caused it, please let me know.
> 
> Otherwise we'll just hope it was a freak occurrence :)
> 
> ---
> 

I have sometimes high load on PyMSNt and I use poll reactor. Just checked my
logs now cus it was eating 15-16% cpu suddenly but I could not find
anything. At least not directly related, have been wondering if I would have
any improvement on epoll reactor. 

Anyways, found a few TBs in the log, maybe you want them? Might be an
important one in there .. :)



[2006-06-13 21:33:41] Traceback (most recent call last):
          File "/usr/local/pymsnt/src/main.py", line 392, in main
            reactor.run()
          File
"/usr/lib/python2.4/site-packages/twisted/internet/posixbase.py", line 218,
in run
            self.mainLoop()
          File
"/usr/lib/python2.4/site-packages/twisted/internet/posixbase.py", line 229,
in mainLoop
            self.doIteration(t)
          File
"/usr/lib/python2.4/site-packages/twisted/internet/pollreactor.py", line
144, in doPoll
            log.callWithLogger(selectable, _drdw, selectable, fd, event,
POLLIN, POLLOUT, log)
        --- <exception caught here> ---
          File "/usr/lib/python2.4/site-packages/twisted/python/log.py",
line 53, in callWithLogger
            return callWithContext({"system": lp}, func, *args, **kw)
          File "/usr/lib/python2.4/site-packages/twisted/python/log.py",
line 38, in callWithContext
            return context.call({ILogContext: newCtx}, func, *args, **kw)
          File "/usr/lib/python2.4/site-packages/twisted/python/context.py",
line 59, in callWithContext
            return self.currentContext().callWithContext(ctx, func, *args,
**kw)
          File "/usr/lib/python2.4/site-packages/twisted/python/context.py",
line 37, in callWithContext
            return func(*args,**kw)
          File
"/usr/lib/python2.4/site-packages/twisted/internet/pollreactor.py", line
172, in _doReadOrWrite
            self._disconnectSelectable(selectable, why, inRead)
          File
"/usr/lib/python2.4/site-packages/twisted/internet/posixbase.py", line 253,
in _disconnectSelectable
            selectable.connectionLost(f)
          File "/usr/lib/python2.4/site-packages/twisted/internet/tcp.py",
line 557, in connectionLost
            Connection.connectionLost(self, reason)
          File "/usr/lib/python2.4/site-packages/twisted/internet/tcp.py",
line 403, in connectionLost
            protocol.connectionLost(reason)
          File "/usr/local/pymsnt/src/tlib/msn/msnw.py", line 653, in
connectionLost
            self.failedMessage(message)
          File "/usr/local/pymsnt/src/tlib/msn/msnw.py", line 677, in
failedMessage
            self.msncon.failedMessage(self.remoteUser, text)
          File "/usr/local/pymsnt/src/legacy/glue.py", line 448, in
failedMessage
            self.session.pytrans.statistics.stats["FailedMessageCount"] += 1
        exceptions.AttributeError: 'NoneType' object has no attribute
'pytrans'

[2006-06-14 02:38:36] Traceback (most recent call last):
        Failure: <type 'int'>: 403

[2006-06-14 14:10:34] Traceback (most recent call last):
        Failure: <type 'int'>: 205

[2006-06-14 16:20:32] Traceback (most recent call last):
        Failure: <type 'int'>: 201

[2006-06-14 16:20:32] Traceback (most recent call last):
        Failure: <type 'int'>: 201

[2006-06-14 18:20:26] Traceback (most recent call last):
          File "/usr/lib/python2.4/site-packages/twisted/python/log.py",
line 53, in callWithLogger
            return callWithContext({"system": lp}, func, *args, **kw)
          File "/usr/lib/python2.4/site-packages/twisted/python/log.py",
line 38, in callWithContext
            return context.call({ILogContext: newCtx}, func, *args, **kw)
          File "/usr/lib/python2.4/site-packages/twisted/python/context.py",
line 59, in callWithContext
            return self.currentContext().callWithContext(ctx, func, *args,
**kw)
          File "/usr/lib/python2.4/site-packages/twisted/python/context.py",
line 37, in callWithContext
            return func(*args,**kw)
        --- <exception caught here> ---
          File
"/usr/lib/python2.4/site-packages/twisted/internet/pollreactor.py", line
160, in _doReadOrWrite
            why = selectable.doRead()
          File "/usr/lib/python2.4/site-packages/twisted/internet/tcp.py",
line 349, in doRead
            return self.protocol.dataReceived(data)
          File
"/usr/lib/python2.4/site-packages/twisted/protocols/basic.py", line 232, in
dataReceived
            why = self.lineReceived(line)
          File "/usr/local/pymsnt/src/tlib/msn/msn.py", line 827, in
lineReceived
            try: handler(params.split(' '))
          File "/usr/local/pymsnt/src/tlib/msn/msn.py", line 1270, in
handle_PRP
            self._fireCallback(int(params[0]), int(params[1]),
unquote(params[3]))
        exceptions.ValueError: invalid literal for int(): MOB

[2006-06-14 18:21:32] Traceback (most recent call last):
          File "/usr/lib/python2.4/site-packages/twisted/python/log.py",
line 53, in callWithLogger
            return callWithContext({"system": lp}, func, *args, **kw)
          File "/usr/lib/python2.4/site-packages/twisted/python/log.py",
line 38, in callWithContext
            return context.call({ILogContext: newCtx}, func, *args, **kw)
          File "/usr/lib/python2.4/site-packages/twisted/python/context.py",
line 59, in callWithContext
            return self.currentContext().callWithContext(ctx, func, *args,
**kw)
          File "/usr/lib/python2.4/site-packages/twisted/python/context.py",
line 37, in callWithContext
            return func(*args,**kw)
        --- <exception caught here> ---
          File
"/usr/lib/python2.4/site-packages/twisted/internet/pollreactor.py", line
160, in _doReadOrWrite
            why = selectable.doRead()
          File "/usr/lib/python2.4/site-packages/twisted/internet/tcp.py",
line 349, in doRead
            return self.protocol.dataReceived(data)
          File
"/usr/lib/python2.4/site-packages/twisted/protocols/basic.py", line 232, in
dataReceived
            why = self.lineReceived(line)
          File "/usr/local/pymsnt/src/tlib/msn/msn.py", line 827, in
lineReceived
            try: handler(params.split(' '))
          File "/usr/local/pymsnt/src/tlib/msn/msn.py", line 1270, in
handle_PRP
            self._fireCallback(int(params[0]), int(params[1]),
unquote(params[3]))
        exceptions.ValueError: invalid literal for int(): MBE

[2006-06-14 20:58:23] Traceback (most recent call last):
          File "/usr/local/pymsnt/src/tlib/msn/msn.py", line 2715, in close
            self.notifyFunc(self.getvalue())
          File "/usr/local/pymsnt/src/tlib/msn/msn.py", line 2378, in
bufferClosed
            d.callback((data,))
          File "/usr/lib/python2.4/site-packages/twisted/internet/defer.py",
line 229, in callback
            self._startRunCallbacks(result)
          File "/usr/lib/python2.4/site-packages/twisted/internet/defer.py",
line 294, in _startRunCallbacks
            self._runCallbacks()
        --- <exception caught here> ---
          File "/usr/lib/python2.4/site-packages/twisted/internet/defer.py",
line 307, in _runCallbacks
            self.result = callback(self.result, *args, **kw)
          File "/usr/local/pymsnt/src/tlib/msn/msnw.py", line 713, in
updateAvatarCB
            self.msncon.gotAvatarImageData(self.remoteUser, imageData)
          File "/usr/local/pymsnt/src/legacy/glue.py", line 542, in
gotAvatarImageData
            av = self.session.pytrans.avatarCache.setAvatar(imageData)
        exceptions.AttributeError: 'NoneType' object has no attribute
'pytrans'

[2006-06-14 21:05:03] Traceback (most recent call last):
          File "/usr/local/pymsnt/src/tlib/msn/msn.py", line 370, in
handleEndHeaders
            handler(info)
          File "/usr/local/pymsnt/src/tlib/msn/msn.py", line 383, in
login_failed
            self.deferred.callback((LOGIN_FAILURE, unquote(info['cbtxt'])))
          File "/usr/lib/python2.4/site-packages/twisted/internet/defer.py",
line 229, in callback
            self._startRunCallbacks(result)
          File "/usr/lib/python2.4/site-packages/twisted/internet/defer.py",
line 294, in _startRunCallbacks
            self._runCallbacks()
        --- <exception caught here> ---
          File "/usr/lib/python2.4/site-packages/twisted/internet/defer.py",
line 307, in _runCallbacks
            self.result = callback(self.result, *args, **kw)
          File "/usr/local/pymsnt/src/tlib/msn/msn.py", line 1131, in
_passportError
            self.loginFailure("Exception while authenticating: %s" %
failure)
          File "/usr/local/pymsnt/src/tlib/msn/msnw.py", line 371, in
loginFailure
            self.factory.msncon.loginFailed(message)
        exceptions.AttributeError: 'NoneType' object has no attribute
'loginFailed'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4490 bytes
Desc: not available
Url : 
http://modevia.com/pipermail/py-transports/attachments/20060615/2b2ff800/smime.bin
From [EMAIL PROTECTED]  Fri Jun 16 16:54:05 2006
From: [EMAIL PROTECTED] (Jonas =?iso-8859-1?Q?=C5dahl?=)
Date: Fri Jun 16 16:54:16 2006
Subject: [py-transports] Multiple hostnames for transports?
Message-ID: <[EMAIL PROTECTED]>

Is it possible for a transport to have multiple hostnames configured? We are
migrating {msn,icq}.jabber.cd.chalmer.se to jabber.se and want to keep the
old names working aswell as {msn,icq}.jabber.se, preferably without running
extra transport instances.

/Jonas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : 
http://modevia.com/pipermail/py-transports/attachments/20060616/29c16adc/attachment.pgp
From [EMAIL PROTECTED]  Fri Jun 16 16:57:17 2006
From: [EMAIL PROTECTED] (Norman Rasmussen)
Date: Fri Jun 16 16:57:24 2006
Subject: [py-transports] Multiple hostnames for transports?
In-Reply-To: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>

On 6/16/06, Jonas ?dahl <[EMAIL PROTECTED]> wrote:
> Is it possible for a transport to have multiple hostnames configured? We are
> migrating {msn,icq}.jabber.cd.chalmer.se to jabber.se and want to keep the
> old names working aswell as {msn,icq}.jabber.se, preferably without running
> extra transport instances.

I'm pretty sure this isn't possible they way the transports are coded
at the moment.  What's the issue with running another copy?

-- 
- Norman Rasmussen
 - Email: [EMAIL PROTECTED]
 - Home page: http://norman.rasmussen.co.za/
From [EMAIL PROTECTED]  Fri Jun 16 17:04:50 2006
From: [EMAIL PROTECTED] (Jonas =?iso-8859-1?Q?=C5dahl?=)
Date: Fri Jun 16 17:04:54 2006
Subject: [py-transports] Multiple hostnames for transports?
In-Reply-To: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>

On Fri, Jun 16, 2006 at 06:57:17PM +0200, Norman Rasmussen wrote:
> On 6/16/06, Jonas ?dahl <[EMAIL PROTECTED]> wrote:
> >Is it possible for a transport to have multiple hostnames configured? We 
> >are
> >migrating {msn,icq}.jabber.cd.chalmer.se to jabber.se and want to keep the
> >old names working aswell as {msn,icq}.jabber.se, preferably without running
> >extra transport instances.
> 
> I'm pretty sure this isn't possible they way the transports are coded
> at the moment.  What's the issue with running another copy?

The issue is computer power. We currently run our transports on individual
Ultra-1 SPARC , and we have to restart them every now and then because they
eat memory. Running twice as many of them would exacerbate the problem.

/Jonas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : 
http://modevia.com/pipermail/py-transports/attachments/20060616/7ec59668/attachment.pgp
From [EMAIL PROTECTED]  Mon Jun 19 07:28:20 2006
From: [EMAIL PROTECTED] (Stian B. Barmen)
Date: Mon Jun 19 07:28:41 2006
Subject: [py-transports] Epoll reactor problems
Message-ID: <[EMAIL PROTECTED]>

Skipped content of type multipart/alternative-------------- next part 
--------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4490 bytes
Desc: not available
Url : 
http://modevia.com/pipermail/py-transports/attachments/20060619/fa9b5400/smime.bin
From [EMAIL PROTECTED]  Mon Jun 19 08:30:54 2006
From: [EMAIL PROTECTED] (Norman Rasmussen)
Date: Mon Jun 19 08:31:02 2006
Subject: [py-transports] PyMSNt errors
In-Reply-To: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
        <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>

rev 175:

        --- <exception caught here> ---
          File 
"/usr/lib/python2.3/site-packages/twisted/internet/pollreactor.py",
line 160, in _doReadOrWrite
            why = selectable.doRead()
          File "/usr/lib/python2.3/site-packages/twisted/internet/tcp.py",
line 349, in doRead
            return self.protocol.dataReceived(data)
          File "/usr/lib/python2.3/site-packages/twisted/protocols/basic.py",
line 232, in dataReceived
            why = self.lineReceived(line)
          File "/home/norman/src/svn/PyMSNt/src/tlib/msn/msn.py", line
806, in lineReceived
            if self.currentMessage.readPos ==
self.currentMessage.length: self.rawDataReceived("") # :(
          File "/home/norman/src/svn/PyMSNt/src/tlib/msn/msn.py", line
850, in rawDataReceived
            if not self.checkMessage(m):
          File "/home/norman/src/svn/PyMSNt/src/tlib/msn/msn.py", line
2183, in checkMessage
            if self._checkTyping(message, cTypes): return 0
          File "/home/norman/src/svn/PyMSNt/src/tlib/msn/msn.py", line
2106, in _checkTyping
            self.gotContactTyping(message)
          File "/home/norman/src/svn/PyMSNt/src/tlib/msn/msnw.py",
line 756, in gotContactTyping
            self.msncon.gotContactTyping(message.userHandle)
          File "/home/norman/src/svn/PyMSNt/src/legacy/glue.py", line
441, in gotContactTyping
            self.session.sendTypingNotification(self.jabberID,
msn2jid(contact, True), True)
        exceptions.AttributeError: 'NoneType' object has no attribute
'sendTypingNotification'

-- 
- Norman Rasmussen
 - Email: [EMAIL PROTECTED]
 - Home page: http://norman.rasmussen.co.za/
From [EMAIL PROTECTED]  Mon Jun 19 08:54:25 2006
From: [EMAIL PROTECTED] (Stian B. Barmen)
Date: Mon Jun 19 08:54:34 2006
Subject: [py-transports] PyMSNt errors
In-Reply-To: <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>

Yes I get this too: 

[2006-06-19 01:21:13] Traceback (most recent call last):
        Failure: <type 'int'>: 208

[2006-06-19 03:16:52] Traceback (most recent call last):
          File "/usr/lib/python2.4/site-packages/twisted/python/log.py",
line 53, in callWithLogger
            return callWithContext({"system": lp}, func, *args, **kw)
          File "/usr/lib/python2.4/site-packages/twisted/python/log.py",
line 38, in callWithContext
            return context.call({ILogContext: newCtx}, func, *args, **kw)
          File "/usr/lib/python2.4/site-packages/twisted/python/context.py",
line 59, in callWithContext
            return self.currentContext().callWithContext(ctx, func, *args,
**kw)
          File "/usr/lib/python2.4/site-packages/twisted/python/context.py",
line 37, in callWithContext
            return func(*args,**kw)
        --- <exception caught here> ---
          File
"/usr/lib/python2.4/site-packages/twisted/internet/pollreactor.py", line
160, in _doReadOrWrite
            why = selectable.doRead()
          File "/usr/lib/python2.4/site-packages/twisted/internet/tcp.py",
line 349, in doRead
            return self.protocol.dataReceived(data)
          File
"/usr/lib/python2.4/site-packages/twisted/protocols/basic.py", line 232, in
dataReceived
            why = self.lineReceived(line)
          File "/usr/local/pymsnt/src/tlib/msn/msn.py", line 827, in
lineReceived
            try: handler(params.split(' '))
          File "/usr/local/pymsnt/src/tlib/msn/msn.py", line 1183, in
handle_NLN
            self.handleAvatarHelper(msnContact, params[4])
          File "/usr/local/pymsnt/src/tlib/msn/msn.py", line 1159, in
handleAvatarHelper
            msnobj = MSNObject(unquote(msnobjStr))
          File "/usr/local/pymsnt/src/tlib/msn/msn.py", line 491, in
__init__
            self.parse(s)
          File "/usr/local/pymsnt/src/tlib/msn/msn.py", line 536, in parse
            self.creator = e.getAttribute("Creator")
        exceptions.AttributeError: 'NoneType' object has no attribute
'getAttribute'

-stian 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Norman Rasmussen
> Sent: Monday, June 19, 2006 10:31 AM
> To: PyAIM-t/PyICQ-t/PyMSN-t Discussion
> Subject: Re: [py-transports] PyMSNt errors
> 
> rev 175:
> 
>         --- <exception caught here> ---
>           File 
> "/usr/lib/python2.3/site-packages/twisted/internet/pollreactor.py",
> line 160, in _doReadOrWrite
>             why = selectable.doRead()
>           File 
> "/usr/lib/python2.3/site-packages/twisted/internet/tcp.py",
> line 349, in doRead
>             return self.protocol.dataReceived(data)
>           File 
> "/usr/lib/python2.3/site-packages/twisted/protocols/basic.py",
> line 232, in dataReceived
>             why = self.lineReceived(line)
>           File 
> "/home/norman/src/svn/PyMSNt/src/tlib/msn/msn.py", line 806, 
> in lineReceived
>             if self.currentMessage.readPos ==
> self.currentMessage.length: self.rawDataReceived("") # :(
>           File 
> "/home/norman/src/svn/PyMSNt/src/tlib/msn/msn.py", line 850, 
> in rawDataReceived
>             if not self.checkMessage(m):
>           File 
> "/home/norman/src/svn/PyMSNt/src/tlib/msn/msn.py", line 2183, 
> in checkMessage
>             if self._checkTyping(message, cTypes): return 0
>           File 
> "/home/norman/src/svn/PyMSNt/src/tlib/msn/msn.py", line 2106, 
> in _checkTyping
>             self.gotContactTyping(message)
>           File "/home/norman/src/svn/PyMSNt/src/tlib/msn/msnw.py",
> line 756, in gotContactTyping
>             self.msncon.gotContactTyping(message.userHandle)
>           File 
> "/home/norman/src/svn/PyMSNt/src/legacy/glue.py", line 441, 
> in gotContactTyping
>             self.session.sendTypingNotification(self.jabberID,
> msn2jid(contact, True), True)
>         exceptions.AttributeError: 'NoneType' object has no 
> attribute 'sendTypingNotification'
> 
> --
> - Norman Rasmussen
>  - Email: [EMAIL PROTECTED]
>  - Home page: http://norman.rasmussen.co.za/ 
> _______________________________________________
> py-transports mailing list
> [email protected]
> http://www.modevia.com/cgi-bin/mailman/listinfo/py-transports
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4490 bytes
Desc: not available
Url : 
http://modevia.com/pipermail/py-transports/attachments/20060619/1a45a3b0/smime.bin
From [EMAIL PROTECTED]  Mon Jun 19 09:06:39 2006
From: [EMAIL PROTECTED] (Stian B. Barmen)
Date: Mon Jun 19 09:06:45 2006
Subject: [py-transports] PyMSNt memory hungry and stalling
Message-ID: <[EMAIL PROTECTED]>

Skipped content of type multipart/alternative-------------- next part 
--------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4490 bytes
Desc: not available
Url : 
http://modevia.com/pipermail/py-transports/attachments/20060619/26e07d17/smime-0001.bin
From [EMAIL PROTECTED]  Mon Jun 19 11:08:37 2006
From: [EMAIL PROTECTED] (Stian B. Barmen)
Date: Mon Jun 19 11:08:46 2006
Subject: [py-transports] PyMSNt memory hungry and stalling
In-Reply-To: <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>

Skipped content of type multipart/mixed-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4490 bytes
Desc: not available
Url : 
http://modevia.com/pipermail/py-transports/attachments/20060619/a01c4f67/smime.bin
From [EMAIL PROTECTED]  Tue Jun 20 14:33:25 2006
From: [EMAIL PROTECTED] (Alexey A. Nikitine)
Date: Tue Jun 20 14:34:36 2006
Subject: [py-transports] Patch
Message-ID: <[EMAIL PROTECTED]>

Hello.

I've met a problem with PyICQ-t (latest SVN):
When I compose messages in cyrillic, some remote ICQ clients receive
them in an unreadable encoding. Those are the clients without (or with a
buggy) unicode support.

I have fixed it, patches are attached. The patches surely won't affect
other users if they set iso-8859-1 as a default encoding in their
config.xml. Russian users would be happy with CP1251 here.

<!-- Default message encoding to use -->
<encoding>iso-8859-1</encoding>

Thank you.

--
Alexey Nikitine.
-------------- next part --------------
--- utils.py    2006-04-28 07:04:37.000000000 +0400
+++ utils.py    2006-06-20 15:27:35.000000000 +0400
@@ -49,7 +49,7 @@ for c in _excluded: excluded[c] = None
                try:
                        us = unicode(s)
                except UnicodeDecodeError:
-                       us = unicode(s, 'iso-8859-1')
+                       us = unicode(s, config.encoding)
                return us.translate(excluded)
        elif s.__class__ == unicode:
                return s.translate(excluded)
-------------- next part --------------
--- oscar.py    2006-05-31 06:30:16.000000000 +0400
+++ oscar.py    2006-06-20 16:02:34.000000000 +0400
@@ -31,6 +31,7 @@ from scheduler import Scheduler
 import threading
 import socks5, sockserror
 import countrycodes
+import config
 
 def logPacketData(data):
     # Comment out to display packet log data
@@ -862,7 +863,7 @@ from scheduler import Scheduler
         self.connectPort = 5190
         # Note that this is "no unicode" default encoding
         # We use unicode if it's there
-        self.defaultEncoding = 'iso-8859-1'
+        self.defaultEncoding = config.encoding
 
         if not self.capabilities:
             self.capabilities = [CAP_CHAT]
@@ -2003,14 +2004,14 @@ from scheduler import Scheduler
                     charSet = 0x0000
                 except:
                     try:
-                        part[0] = part[0].encode('iso-8859-1')
+                        part[0] = part[0].encode(config.encoding)
                         charSet = 0x0003
                     except:
                         try:
                             part[0] = part[0].encode('utf-16be', 'replace')
                             charSet = 0x0002
                         except:
-                            part[0] = part[0].encode('iso-8859-1', 'replace')
+                            part[0] = part[0].encode(config.encoding, 
'replace')
                             charSet = 0x0003
             if 'macintosh' in part[1:]:
                 charSubSet = 0x000b
@@ -2023,7 +2024,7 @@ from scheduler import Scheduler
         # We'll investigate this in more detail later.
         features = '\x01\x01\x02'
         # Why do i need to encode this?  I shouldn't .. it's data.
-        data = data.encode('iso-8859-1', 'replace') + TLV(2, TLV(0x0501, 
features)+messageData)
+        data = data.encode(config.encoding, 'replace') + TLV(2, TLV(0x0501, 
features)+messageData)
         if wantAck:
             log.msg("sendMessage: Sending wanting ACK")
             data = data + TLV(3)
From [EMAIL PROTECTED]  Tue Jun 20 14:45:35 2006
From: [EMAIL PROTECTED] (Alexey A. Nikitine)
Date: Tue Jun 20 14:46:36 2006
Subject: [py-transports] Delay
Message-ID: <[EMAIL PROTECTED]>

Hello.

There is a strange bug in PyICQ-t. I observe quite a long delay (about
10 sec.) between receiving a message by a jabber server and
retransmitting it to the ICQ server. However, it relays messages back
(from ICQ to Jabber) much faster. In addition, sending a message from
ICQ to Jabber triggers those delayed messages to be sent to ICQ.

Why does PyICQ-t work so strange? I tried both 0.7b and SVN.

Thank you.

--
Alexey Nikitine.




Reply via email to