OSDN Git Service

gobex: fix transfer search in transfer_complete
authorMikel Astiz <mikel.astiz@bmw-carit.de>
Tue, 13 Dec 2011 16:21:22 +0000 (17:21 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 4 Dec 2012 21:22:04 +0000 (22:22 +0100)
commit7dbc36186e5a6d9406d683323e715b90657f3e03
tree1d09dd93398b462848bf26664d27b428bd26baea
parentd2b34b6a68f0e00b75251f064af88af7515ee955
gobex: fix transfer search in transfer_complete

The previous approach searched the transfer pointer itself, assuming
that the transfers has not been modified if the pointer is in the list.
However the callback could have removed the transfer and registered
another one, which can eventually point to the same memory location.

This is solved by looking for the transfer id instead of the pointer.
gobex/gobex-transfer.c