Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d873256 authored by Andre Eisenbach's avatar Andre Eisenbach
Browse files

Remove unused p_db for A2DP service discovery

This fixes a crash (SIGSEGV) when re-connecting A2DP devices where the
SDP pointer was incorrectly reset to 0.

Bug: 27852645
Change-Id: Ie40b7e57fc117c6fe7a42020600745ef348b503c
parent a7de2640
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1017,7 +1017,6 @@ void bta_av_do_disc_a2d (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
    /* set up parameters */
    db_params.db_len = BTA_AV_DISC_BUF_SIZE;
    db_params.num_attr = 3;
    db_params.p_db = NULL;
    db_params.p_attrs = attr_list;
    p_scb->uuid_int = p_data->api_open.uuid;
    p_scb->sdp_discovery_started = TRUE;
+1 −2
Original line number Diff line number Diff line
@@ -306,8 +306,7 @@ tA2D_STATUS A2D_FindService(UINT16 service_uuid, BD_ADDR bd_addr,

    if (result == TRUE)
    {
        /* store service_uuid and discovery db pointer */
        a2d_cb.find.p_db = p_db->p_db;
        /* store service_uuid */
        a2d_cb.find.service_uuid = service_uuid;
        a2d_cb.find.p_cback = p_cback;

+0 −1
Original line number Diff line number Diff line
@@ -102,7 +102,6 @@ typedef struct
{
    UINT32              db_len;  /* Length, in bytes, of the discovery database */
    UINT16              num_attr;/* The number of attributes in p_attrs */
    tSDP_DISCOVERY_DB  *p_db;    /* Pointer to the discovery database */
    UINT16             *p_attrs; /* The attributes filter. If NULL, A2DP API sets the attribute filter
                                  * to be ATTR_ID_SERVICE_CLASS_ID_LIST, ATTR_ID_BT_PROFILE_DESC_LIST,
                                  * ATTR_ID_SUPPORTED_FEATURES, ATTR_ID_SERVICE_NAME and ATTR_ID_PROVIDER_NAME.