LE: Do not generate an error if a device is already whitelisted
If a device is added to the whitelist that is already listed, no error
should be generated.
Change-Id: I81ad47eec47157d5ab2b5b25db3ed15bf873794e
diff --git a/stack/gatt/gatt_utils.c b/stack/gatt/gatt_utils.c
index b7f5224..e15918c 100644
--- a/stack/gatt/gatt_utils.c
+++ b/stack/gatt/gatt_utils.c
@@ -2315,7 +2315,7 @@
if (p_dev->gatt_if[i] == gatt_if)
{
GATT_TRACE_ERROR0("device already in iniator white list");
- break;
+ return TRUE;
}
else if (p_dev->gatt_if[i] == 0)
{
@@ -2332,7 +2332,7 @@
if (p_dev->listen_gif[i] == gatt_if)
{
GATT_TRACE_ERROR0("device already in adv white list");
- return FALSE;
+ return TRUE;
}
else if (p_dev->listen_gif[i] == 0)
{