Fix TC fail issue in multi ADV senario 09/163009/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 7 Dec 2017 01:52:38 +0000 (10:52 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 7 Dec 2017 01:53:54 +0000 (10:53 +0900)
Change-Id: I443748754ed8322a5106bf55ab51596a30c048ba
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
src/bluetooth-adapter.c

index aadf776..91289f9 100644 (file)
@@ -1618,9 +1618,15 @@ int bt_adapter_le_destroy_advertiser(bt_advertiser_h advertiser)
                error_code = bluetooth_set_advertising(__adv->handle, FALSE);
 
                ret = _bt_get_error_code(error_code);
-               if (ret != BT_ERROR_NONE)
+               if (ret != BT_ERROR_NONE) {
                        BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret),
                                                        ret); /* LCOV_EXCL_LINE */
+
+                       if (ret == BT_ERROR_NOT_IN_PROGRESS) {
+                               /* Other advertising handle is in there */
+                               ret = BT_ERROR_NONE;
+                       }
+               }
        }
 
        advertiser_list = g_slist_remove(advertiser_list, __adv);