Commit: 27906878d9a9a3daebc84d72c6b20496da22c0a2
Parent: ef84cfa6e28a2648d70c1b7fff06b65c6b87471a
Author: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com>
Committer: Marcel Holtmann <marcel@holtmann.org>
Date: 2012-12-04 23:48:23
Tree: 7d868f7d6eca53f94c7745abd652365bf60deb12

obexd: Fix not closing socket when connection attempt fails When connection attempt fails the socket were left opened as it is not assigned to the session, also when the connection does succeed the socket is closed twice when the session is removed. To fix those issues session now holds a reference to the GIOChannel returned bt bt_io_connect so that the connection can properly close when releasing, in addiction to that it also is marked to not close the socket when the connection succeeds so that when removing the session it doesn't close the socket twice. Thanks for Vitja Makarov <vitja.makarov@gmail.com> for reporting this.

Diffstat

M obexd/client/session.c | 39 +++++++++++++++++++++++++- - - - - - - - - - - - - -
M obexd/client/session.h | 2 +-

2 files changed, 26 insertions(+), 15 deletions(-)

View Full Diff | Patch