Fixing File Transfer in 3.0

Michael McConville mmcconville at mykolab.com
Sun Jul 26 21:25:39 EDT 2015


Jorge VillaseƱor wrote:
> Michael McConville <mmcconville at mykolab.com> wrote:
> > File transfer has been broken in 3.0 for a while:
> >
> >         https://developer.pidgin.im/ticket/16001
> >
> > I found two issues:
> >
> >         * the recipient was accounting for each received byte twice (the
> >           obvious and reported issue)
> >         * redundant calls to the transfer completion function were
> >           slightly, non-deterministically truncating files
> >
> > This fixes both for me on XMPP:
> >
> >         https://hg.pidgin.im/soc/2015/mmcc/main/rev/acd5549cf5d6
> >
> > Because each protocol uses the file transfer API in its own way, this
> > might break some. However, I'd call this "unambiguously less broken".
> > Any objections?
> >
> Looks good.

It was committed a few days ago:

	https://hg.pidgin.im/pidgin/main/rev/68004413f6e7

> I wonder if each protocol uses the file transfer API in its own way means
> the API is broken and we should change it.

This is a common sentiment.  :-)

I looked into this a bit a few weeks ago. If I remember correctly, the
API seemed sane in terms of the functions it offered. However, what
happened where seemed confused (e.g. those extra transfer completion
calls). It also appeared that some protocols had idiosyncrasies in their
file transfer specifications (not just implementations). So, maybe the
libpurple API needs to be lower-level to account for that.



More information about the Devel mailing list