diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2015-06-22 11:29:44 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2015-06-24 14:35:41 +0300 |
commit | ec0e3b1784e039ecb5b81638569c17cdb8e92501 (patch) | |
tree | 7e0ab11dba7064d6727830464cc415e02cbc5d6d /unit | |
parent | c6fa51ccb4e16629e16e6f9fe7fe862aa9a12c8c (diff) | |
download | bluez-ec0e3b1784e039ecb5b81638569c17cdb8e92501.tar.gz |
unit/test-gatt: Use auto security
If the test don't expect any errors to happen use set security to auto so
bt_att will take care of elevating the security whenever needed.
Diffstat (limited to 'unit')
-rw-r--r-- | unit/test-gatt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/unit/test-gatt.c b/unit/test-gatt.c index bb6a2703f..9a9fa6092 100644 --- a/unit/test-gatt.c +++ b/unit/test-gatt.c @@ -630,6 +630,10 @@ static void client_ready_cb(bool success, uint8_t att_ecode, void *user_data) if (context->data->step) { const struct test_step *step = context->data->step; + /* Auto elevate security for test that don't expect error */ + if (!step->expected_att_ecode) + bt_att_set_security(context->att, BT_ATT_SECURITY_AUTO); + step->func(context); return; } |