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:05 +0000 (15:39 -0800)
commiteebc8ab9c5e362d721f8f606f0a564ca9aff89d9
tree6d11c60255df3d0ffa225ead50a53494d4a19288
parentf4471c7e6ca7a0bd4846b2fe4fbe78d79ef37b81
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: I8558abc9eace609b1ba02485b0ff775fb6f3c6af
btif/src/btif_dm.c