Remove the exception case for XU3 LE scanning
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / bt-service-adapter-le.c
index 43e8cf5..eddbd36 100644 (file)
@@ -41,6 +41,7 @@
 #define BT_ADV_FILTER_POLICY_DEFAULT   0x00
 #define BT_ADV_TYPE_DEFAULT    0x00
 #define BT_ADV_FILTER_POLICY_ALLOW_SCAN_CONN_WL_ONLY   0x03
+#define BT_ADV_MULTI_MAX   16
 
 typedef struct {
        int adv_inst_max;
@@ -197,6 +198,7 @@ gboolean _bt_update_le_feature_support(const char *item, const char *value)
 
                slot_num = atoi(value);
                retv_if(slot_num < 0, FALSE);
+               retv_if(slot_num > BT_ADV_MULTI_MAX, FALSE);
 
                if (slot_num != le_feature_info.adv_inst_max) {
                        __bt_free_le_adv_slot();