OSDN Git Service

DO NOT MERGE Change pairing_cb to assume temporary pairing by default
authorAndre Eisenbach <eisenbach@google.com>
Mon, 26 Jan 2015 21:49:36 +0000 (13:49 -0800)
committerAndre Eisenbach <eisenbach@google.com>
Tue, 3 Feb 2015 23:39:13 +0000 (15:39 -0800)
commita708936da347b32f2a0811b5f33d9068c2b0de6f
treed990c280f57c08b374a798429f7b0a40acfa2489
parentf37767a17b2d80828f7ac4fa170859cb9e2f0bc6
DO NOT MERGE Change pairing_cb to assume temporary pairing by default

When pairing takes place, the pairing_cb.is_temp flag indicates whether
a pairing is temporary or permanent. Link keys are not stored for
temporary pairings. Since this is a "positive" flag, resetting the
pairing_cb control block (ex. memset to 0), it will assume persistent
pairing by default. Under certain circumstances, this can lead to a link
key being stored for temporarily secured connection.

This patch reverses the flag to be a "negative" flag. Renamed to
"persistent_bond", the default 0 meaning is now used to indicate a
temporary bond. If the lag is not properly set now, it will default to a
temporary bond and will not save the link key erronously.

Bug: 18345373
Change-Id: I06b1ba9331a70ebc29f4437bf836164658dec5ae
btif/src/btif_dm.c