OSDN Git Service

core: Expose the last bonding attempt timeout on retry
authorAlex Deymo <deymo@chromium.org>
Thu, 9 May 2013 00:38:01 +0000 (17:38 -0700)
committerJohan Hedberg <johan.hedberg@intel.com>
Fri, 10 May 2013 07:23:47 +0000 (10:23 +0300)
commit63581e155c94261ed582740a91488849e30014a6
tree5dffa6946c48aa0b785b3e04d27b64f4c7ab4098
parent4cf14a98e5228a15eaf275a8d437b0254bbe876f
core: Expose the last bonding attempt timeout on retry

One of the interesting values for pincode plugins is the timeout of a
bonding attempt. For keyboards supporting any random pincode as long as
it is also typed in the keyboard, the timeout until it fails is in the
order of the seconds to allow the user type the pincode on the bluetooth
keyboard. In the case of a dumb keyboard accepting only a fixed pincode
the timeout before the keyboard fails is in the order of a fraction of a
second.

This patch computes the elapsed time between the pairing started or the
pin code was sent to the device and the device returns with an error.
This measured duration is exposed in milliseconds to the plugins when
retrying the bonding attempt.
src/adapter.c
src/device.c
src/device.h