purple: fix FT behavior with NULL read/write callbacks
commit06156e8492a848353e1ada3aee3a9dfa87d6887a
authorJakub Adam <jakub.adam@ktknet.cz>
Wed, 7 Oct 2015 08:44:20 +0000 (7 10:44 +0200)
committerJakub Adam <jakub.adam@ktknet.cz>
Thu, 8 Oct 2015 09:19:51 +0000 (8 11:19 +0200)
treefeda606abe95fea14c9c4ad65a37b0156ec07bd1
parent4b0c0301ee7308b14b31a90134b0d3d3b7b09e3e
purple: fix FT behavior with NULL read/write callbacks

If we don't want to override how libpurple handles socket reading and
writing (i.e. no ft_read or ft_write callback set in sipe_file_transfer
structure), we must not call purple_xfer_set_read_fnc() or
purple_xfer_set_write_fnc() to set up purple backend's auxiliary r/w
functions either.

Only when the functions are not set will libpurple handle the data
transfer on its own using read() and write() on file descriptor we
passed in purple_xfer_start().

See implementation of purple_xfer_read() and purple_xfer_write().
src/purple/purple-ft.c