system/bt
Revision | fc027b44bceda01fc4cfb1d63d19787a095d915c (tree) |
---|---|
Zeit | 2017-04-22 02:31:09 |
Autor | android-build-team Robot <android-build-team-robot@goog...> |
Commiter | android-build-team Robot |
release-request-762540b1-1728-41bc-a9ce-e977f3e2683f-for-git_nyc-mr2-pixel-monthly-release-3888830 snap-temp-L22300000056915770
Change-Id: I6bcb0d7906f30abb7a42947d5f93b12a335a3e82
@@ -28,8 +28,6 @@ | ||
28 | 28 | #include <stdio.h> |
29 | 29 | #include <stddef.h> |
30 | 30 | |
31 | -#include <log/log.h> | |
32 | - | |
33 | 31 | #include "bt_types.h" |
34 | 32 | #include "bt_utils.h" |
35 | 33 | #include "btm_ble_api.h" |
@@ -2287,7 +2285,7 @@ static void btm_ble_parse_adv_data(tBTM_INQ_INFO *p_info, UINT8 *p_data, | ||
2287 | 2285 | ** Returns void |
2288 | 2286 | ** |
2289 | 2287 | *******************************************************************************/ |
2290 | -BOOLEAN btm_ble_cache_adv_data(tBTM_INQ_RESULTS *p_cur, UINT8 data_len, UINT8 *p, UINT8 evt_type) | |
2288 | +void btm_ble_cache_adv_data(tBTM_INQ_RESULTS *p_cur, UINT8 data_len, UINT8 *p, UINT8 evt_type) | |
2291 | 2289 | { |
2292 | 2290 | tBTM_BLE_INQ_CB *p_le_inq_cb = &btm_cb.ble_ctr_cb.inq_var; |
2293 | 2291 | UINT8 *p_cache; |
@@ -2307,16 +2305,8 @@ BOOLEAN btm_ble_cache_adv_data(tBTM_INQ_RESULTS *p_cur, UINT8 data_len, UINT8 *p | ||
2307 | 2305 | STREAM_TO_UINT8(length, p); |
2308 | 2306 | while ( length && ((p_le_inq_cb->adv_len + length + 1) <= BTM_BLE_CACHE_ADV_DATA_MAX)) |
2309 | 2307 | { |
2310 | - /* adv record size must be smaller than the total adv data size */ | |
2311 | - if ((length + 1) > data_len) { | |
2312 | - BTM_TRACE_ERROR("BTM - got incorrect LE advertising data"); | |
2313 | - android_errorWriteLog(0x534e4554, "33899337"); | |
2314 | - return FALSE; | |
2315 | - } | |
2316 | 2308 | /* copy from the length byte & data into cache */ |
2317 | 2309 | memcpy(p_cache, p-1, length+1); |
2318 | - /* reduce the total data size by size of data copied */ | |
2319 | - data_len -= length + 1; | |
2320 | 2310 | /* advance the cache pointer past data */ |
2321 | 2311 | p_cache += length+1; |
2322 | 2312 | /* increment cache length */ |
@@ -2326,7 +2316,6 @@ BOOLEAN btm_ble_cache_adv_data(tBTM_INQ_RESULTS *p_cur, UINT8 data_len, UINT8 *p | ||
2326 | 2316 | STREAM_TO_UINT8(length, p); |
2327 | 2317 | } |
2328 | 2318 | } |
2329 | - return TRUE; | |
2330 | 2319 | |
2331 | 2320 | /* parse service UUID from adv packet and save it in inq db eir_uuid */ |
2332 | 2321 | /* TODO */ |
@@ -2551,9 +2540,7 @@ BOOLEAN btm_ble_update_inq_result(tINQ_DB_ENT *p_i, UINT8 addr_type, UINT8 evt_t | ||
2551 | 2540 | BTM_TRACE_WARNING("EIR data too long %d. discard", data_len); |
2552 | 2541 | return FALSE; |
2553 | 2542 | } |
2554 | - if (!btm_ble_cache_adv_data(p_cur, data_len, p, evt_type)) { | |
2555 | - return FALSE; | |
2556 | - } | |
2543 | + btm_ble_cache_adv_data(p_cur, data_len, p, evt_type); | |
2557 | 2544 | |
2558 | 2545 | p1 = (p + data_len); |
2559 | 2546 | STREAM_TO_UINT8 (rssi, p1); |