diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2015-02-27 10:20:33 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2015-02-27 10:20:33 +0200 |
commit | 6271215e3d077ceb0dad63ac60d09ccd51cadc07 (patch) | |
tree | 2a7014a38377e2f2f57f6511c4bdd89ef039206f /src | |
parent | 60ba9a54934ed2bd1cf60c858fc0defd2e4f725e (diff) | |
download | bluez-6271215e3d077ceb0dad63ac60d09ccd51cadc07.tar.gz |
mgmt: Update code to match updated New CSRK specification
The 'master' parameter was renamed to 'type' and now has two new
possible values.
Diffstat (limited to 'src')
-rw-r--r-- | src/adapter.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/adapter.c b/src/adapter.c index 32faa261d..43501cbf4 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -6156,7 +6156,7 @@ static void new_long_term_key_callback(uint16_t index, uint16_t length, static void store_csrk(const bdaddr_t *local, const bdaddr_t *peer, uint8_t bdaddr_type, const unsigned char *key, - uint32_t counter, uint8_t master) + uint32_t counter, uint8_t type) { const char *group; char adapter_addr[18]; @@ -6168,12 +6168,12 @@ static void store_csrk(const bdaddr_t *local, const bdaddr_t *peer, char *str; int i; - if (master == 0x00) + if (type == 0x00 || type == 0x02) group = "LocalSignatureKey"; - else if (master == 0x01) + else if (type == 0x01 || type == 0x03) group = "RemoteSignatureKey"; else { - warn("Unsupported CSRK type %u", master); + warn("Unsupported CSRK type %u", type); return; } @@ -6219,8 +6219,8 @@ static void new_csrk_callback(uint16_t index, uint16_t length, ba2str(&addr->bdaddr, dst); - DBG("hci%u new CSRK for %s master %u", adapter->dev_id, dst, - ev->key.master); + DBG("hci%u new CSRK for %s type %u", adapter->dev_id, dst, + ev->key.type); device = btd_adapter_get_device(adapter, &addr->bdaddr, addr->type); if (!device) { @@ -6232,7 +6232,7 @@ static void new_csrk_callback(uint16_t index, uint16_t length, return; store_csrk(bdaddr, &key->addr.bdaddr, key->addr.type, key->val, 0, - key->master); + key->type); if (device_is_temporary(device)) btd_device_set_temporary(device, FALSE); |