mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 04:04:31 +02:00
Merge branch 'bugfix/btdm_find_remote_service_by_uuid_always_return_success_v3.0' into 'release/v3.0'
component/bt: Fix bug of SDP find services by uuid always return success (backport 3.0) See merge request idf/esp-idf!3165
This commit is contained in:
@@ -354,17 +354,19 @@ static void sdp_copy_raw_data (tCONN_CB *p_ccb, BOOLEAN offset)
|
|||||||
type = *p++;
|
type = *p++;
|
||||||
p = sdpu_get_len_from_type (p, type, &list_len);
|
p = sdpu_get_len_from_type (p, type, &list_len);
|
||||||
}
|
}
|
||||||
if (list_len && list_len < cpy_len ) {
|
if (list_len < cpy_len ) {
|
||||||
cpy_len = list_len;
|
cpy_len = list_len;
|
||||||
}
|
}
|
||||||
#if (SDP_DEBUG_RAW == TRUE)
|
#if (SDP_DEBUG_RAW == TRUE)
|
||||||
SDP_TRACE_WARNING("list_len :%d cpy_len:%d raw_size:%d raw_used:%d\n",
|
SDP_TRACE_DEBUG("list_len :%d cpy_len:%d raw_size:%d raw_used:%d\n",
|
||||||
list_len, cpy_len, p_ccb->p_db->raw_size, p_ccb->p_db->raw_used);
|
list_len, cpy_len, p_ccb->p_db->raw_size, p_ccb->p_db->raw_used);
|
||||||
#endif
|
#endif
|
||||||
|
if (cpy_len != 0){
|
||||||
memcpy (&p_ccb->p_db->raw_data[p_ccb->p_db->raw_used], p, cpy_len);
|
memcpy (&p_ccb->p_db->raw_data[p_ccb->p_db->raw_used], p, cpy_len);
|
||||||
p_ccb->p_db->raw_used += cpy_len;
|
p_ccb->p_db->raw_used += cpy_len;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
Reference in New Issue
Block a user