Hey people,
First of all, let me introduce myself. I am a 2nd year software
engineering student from the Netherlands. Besides my study I have a
part-time job as programmer.
Since I hated the adds and looks of msn messenger, I switched to aMSN a
few years ago. I have been an enthusiastic user since. Around a half
year ago I saw the blogpost of one of the developers about aMSN 2. I
thought it would be fun to start contributing, but since there was only
a 'getting started' guide for Linux I lost interest and forgot all about
it. A month ago I searched for a Windows guide again, but it still
wasn't there. I then decided to make this guide myself, afterall it
couldn't be any harder than getting the amsn2 code, installing python
and maybe a few other things.
These 'few other things' turned out to be quite a few (see my post on
the forums:
http://www.amsn-project.net/forums/viewtopic.php?p=37552#37552 ), so it
took me around a day to get it working.
It was then that I found out that I couldn't log in. I spoke with a few
developpers on the irc channel, and said that I would fix the bug myself.
There turned out to be 2 bugs:
The first bug is that the socket object has the status 'OPEN', but in
fact isn't open at all. This means there is a bug in the sock class (or
one of its super classes) of the 'gnet' module of pymsn. I spend some
time trying to analyse this bug. I found out the following:
* The actual opening of the socket returns the 'EWOULDBLOCK' error
code (line 99 of 'iochannel.py': err =
self._transport.connect_ex((host, port) ). Might this be the
problem? In the code this error is handled the same as no error:
the status is set to 'OPEN'.
* The bug doesn't occur when opening 'test.py' from pymsn. Has this
anything to do with some sort of threading? (I am new to python
and don't know if it has threading, or how it uses it). I do not
know why it works in test.py and not in aMSN2, but I do know that
the socket object it self is responsible for making sure that it
is really open when it says it is.
* When I put a 'sleep' of 1 second in the 'post open' function the
bug didn't occur anymore.
The second bug occurs in both aMSN 2 and test.py.
* Only one package (2048 bytes) from the soapresponse is read. After
this the socket closes. Should the socket stay open? Or should it
close, but first pass the data it received?
When I also use a workaround for this (changing the 2048 bytes to 8000,
so the first package contains the whole response) I am able to log in
and chat.
Is there anyone (who knows the ins and outs of sockets), who can fix
these bugs, or point me in the right direction?
Cya,
Mark Lagendijk
------------------------------------------------------------------------------
_______________________________________________
Amsn-devel mailing list
Amsn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amsn-devel