Re: IdleTimeout behavior for Sony PS3 remote in Bluez 5
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Date: 2015-08-24 10:48:24
Hi David, On Mon, Aug 24, 2015 at 1:40 PM, David Herrmann [off-list ref] wrote:
Hi On Mon, Aug 24, 2015 at 10:12 AM, Luiz Augusto von Dentz [off-list ref] wrote:quoted
Hi David, On Fri, Aug 21, 2015 at 12:03 PM, David Herrmann [off-list ref] wrote:quoted
Hey On Thu, Aug 20, 2015 at 10:52 AM, Luiz Augusto von Dentz [off-list ref] wrote:quoted
@David: Since apparently you was the author of the patch the remove setting EUNATCH to sk_err can you tell if that was intentional or you did not know that it could affect the timeout implementation? Btw, it would nice if you could comment regarding moving the timeout policy to the HID driver.This sounds like an oversight. From a quick look, hidp_session_terminate() should set these errors properly. I can try to craft a patch on Monday.I wonder if it isn't better to just call kernel_sock_shutdown directly since either way we want to disconnect and the userspace is not really doing anything special with EUNATCH either, it just see there is an error and close its reference which happens to be the last one causing it disconnect.I'm not very comfortable with -net internals, so not sure what behavior you want. Calling kernel_sock_shutdown() sounds fine, but that cannot be done from hidp_session_terminate(). Instead, you must call it from hidp_session_thread() somewhere near hidp_del_timer(), before hidp_session_put().
Then lets keep it simple and just set EUNATCH as it was before. -- Luiz Augusto von Dentz