Commit: d8f6a237ab3b91f540f2b8b71fb6a9bece1ae659
Parent: 58d6a048718d3313011eada1e71dfd337b204811
Author: Arman Uguray <armansito@chromium.org>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2014-11-25 23:49:43
Tree: 8069a9a83cc7d04f2c6f8f19d311fe6020282716

shared/att: Call io_shutdown on ATT violations The existing code handles ATT protocol request timeouts and invalid incoming request PDUs by cleaning up the io structure via io_destroy. This doesn't always work, since this only terminates the connection if io_set_close_on_destroy has been set. Calling io_destroy to force a disconnect also has the added side-effect of not invoking the disconnect callback registered with struct io. This patch fixes these by calling io_shutdown on the io instead when required by ATT protocol specification. This both cleans up the connection regardless of whether or not close_on_unref has been set, and it triggers the disconnect callback via an EPOLLHUP event.

Diffstat

M src/shared/att.c | 21 +++++++++++++- - - - - - - -

1 files changed, 13 insertions(+), 8 deletions(-)

View Full Diff | Patch