Fixing File Transfer in 3.0

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

Jorge VillaseƱor wrote:
> Michael McConville <mmcconville at> wrote:
> > File transfer has been broken in 3.0 for a while:
> >
> >
> >
> > 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:
> >
> >
> >
> > 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:

> 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