OSDN Git Service

core: Retry bonding attempt until the iterator reaches the end
authorAlex Deymo <deymo@chromium.org>
Thu, 9 May 2013 00:37:58 +0000 (17:37 -0700)
committerJohan Hedberg <johan.hedberg@intel.com>
Fri, 10 May 2013 07:20:50 +0000 (10:20 +0300)
commit445a1036a11eb92df1c1ab76353ef2608087513d
tree8f129304049f6060e7f6c19efde65756ce5098a2
parent543d659bdc4797f9300514893f815f2007f16527
core: Retry bonding attempt until the iterator reaches the end

This patch splits the bonding process in an interative process
consisting of one or more "bonding attempts". The user/agent starts a
new "bonding" that may involve several rounds of "bonding attempts" with
the device before it gets back to the user/agent.

Some functions were split in two parts to reflect this change. When a
bonding attempt fails with an authentication error and a pin code was
provided, a new bonding attempt is initiated (after a short delay) to
retry with the next function (or next call to the same function) in the
pincode callback list. If no pin code was provided to the device, no
retry is attempted and the authentication error is returned to the
client. This effectively allows a plugin try different pincodes for the
same device during the same bonding.
src/adapter.c
src/adapter.h
src/device.c
src/device.h