Yahoo! Improvement SoC Project

Sulabh Mahajan at
Sun Nov 16 11:31:18 EST 2008

As of now I have completed the following tasks in this project:

1. p2p support for yahoo!
Under p2p support:

Basic p2p setup:
a. When we initiate a conversation with a peer, we send our encoded IP
address to the peer through the yahoo server.
We accept connections at port 5101, peer connects to us, and exchanges a few
packets, sort of handshake.
 b. When peer initiates the connection, we receive its IP address from the
server, and we setup the connection to the peer at port 5101.

After establishing the connection, messages and notifications to the peer
are passed not to the yahoo server but directly to the peer.

p2p file transfers:

When transferring file between two peers, if no p2p link exists, an attempt
is made to establish a p2p connection, same way as mentioned above. If
attempt fails file is relayed through yahoo server.
If p2p connection is established or already exists, then depending upon
which of the two peers is acting as the server, and upon who is transferring
to whom, p2p url is exchanged, verified using HEAD, downloaded using GET,
uploaded using POST.
When acting as a p2p server we also act as the file server during the
transfers, a random port is used for the purpose.

2. Provides SMS support: send/receive
a. To receive:
Similar to receiving the IM messages. A field in the packet carries the
information about the carrier, which we use to send the SMS

b. To send:
For sending sms, use format +<ph no>
"+" acts as the identifier for the phone number

If we do not know the carrier of the phone number already, we get it from a
yahoo server. and then use that carrier to send the SMS
We are notified when we cant send the message to a particular phone number.

3. MSN Interoperability
We differentiate between yahoo ids and Windows Live ids by the fact that a
yahoo id is just a simple id, whereas a Windows Live id would be an email
address. So a buddy with "@" is treated as windows live id, else its
Its suboptimal, in the way that users might unknowingly add their yahoo
buddies with whole yahoo email id, and it will end up being added as a
Windows Live id. But this is best I could have done without changing
libpurple. Also we still don't support those yahoo ids that do not end in

Following features are added:
adding buddies
removing buddies
sending/receiving messages
changing group
presence settings

I have tried to figure out all the test cases where my code might fail or
behave unusually. I have removed most of the bugs that I have found. The
procedures for p2p are quite complex for reverse engineering and I didn't
get the opportunity to test it completely, especially when we would be
acting as a server and several users will be connecting to us.
I would ask people to look into my branch, test/review the code, and let me
know of any bugs.

I have not been able to remove a bug, I hope someone can help me with this.
To reproduce:

after signing in, initiate conversation with a yahoo buddy so that you act
as the p2p server. Then try to send the file. There is trouble displaying
the progress of the file transfer, and eventually it appears to have failed,
even though the file actually gets transferred completely. The receiver has
a binary copy of the file, but pidgin reports the file transfer was

Thanking you


On Wed, Nov 12, 2008 at 1:03 PM, Mark Doliner <mark at> wrote:

> I reviewed the code as Sulabh committed it along the away and it
> looked good to me.  But it's certainly wouldn't hurt to have have
> someone else look through it.
> Sulabh, can you also provide a summary of the benefits of your changes?
> -Mark
> 2008/11/11 Sulabh Mahajan < at>:
>  > Hello,
> >
> > The project was mentored by Mark Doliner.
> >
> > There are a few issues with the code, I am sorry I am not getting time
> these
> > days to look into them, because of exams, seminars, presenations, etc at
> the
> > college.
> >
> > In a day or two, I will write to the devel list a summary of the tasks
> > completed in this project, and also remove a few bugs that I think still
> > exist. Merging into the main code happen soon.
> >
> > Thanks,
> >
> > Sulabh
> >
> > 2008/11/12 John Bailey <rekkanoryo at>
> >>
> >> Who was the mentor of this project?  Did anyone start a code review to
> see
> >> if we
> >> could merge any of this code to im.pidgin.pidgin?  I have a feeling it
> >> could
> >> resolve a few of our open Yahoo tickets, particularly those related to
> >> file
> >> transfers.
> >>
> >> John
> >>
> >>
> >> _______________________________________________
> >> Devel mailing list
> >> Devel at
> >>
> >>
> >
> >
> > _______________________________________________
> > Devel mailing list
> > Devel at
> >
> >
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Devel mailing list