only generate oob if using oob

pull/6932/head
paul-szczepanek-arm 2018-03-26 18:00:05 +01:00
parent d1b4713ae6
commit e1885486fa
1 changed files with 5 additions and 1 deletions

View File

@ -556,7 +556,11 @@ ble_error_t GenericSecurityManager::setOOBDataUsage(
cb->attempt_oob = useOOB;
cb->oob_mitm_protection = OOBProvidesMITM;
return generateOOB(&cb->local_address);;
if (useOOB) {
return generateOOB(&cb->local_address);
} else {
return BLE_ERROR_NONE;
}
}
ble_error_t GenericSecurityManager::confirmationEntered(