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

Commit 079c0be0 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes from topic "am-86018ff8-723c-4999-a292-3b3936b26850" into nyc-dr1-dev

* changes:
  [automerger] DO NOT MERGE: PAN: Always allocate in bta_pan_data_buf_ind_cback am: 76dc39bd
  DO NOT MERGE: PAN: Always allocate in bta_pan_data_buf_ind_cback
parents d6df4c41 2641fd80
Loading
Loading
Loading
Loading
+12 −16
Original line number Original line Diff line number Diff line
@@ -182,8 +182,6 @@ static void bta_pan_data_buf_ind_cback(UINT16 handle, BD_ADDR src, BD_ADDR dst,
        return;
        return;
    }
    }


    if (sizeof(tBTA_PAN_DATA_PARAMS) > p_buf->offset) {
        /* offset smaller than data structure in front of actual data */
    if (sizeof(BT_HDR) + sizeof(tBTA_PAN_DATA_PARAMS) + p_buf->len >
    if (sizeof(BT_HDR) + sizeof(tBTA_PAN_DATA_PARAMS) + p_buf->len >
        PAN_BUF_SIZE) {
        PAN_BUF_SIZE) {
        android_errorWriteLog(0x534e4554, "63146237");
        android_errorWriteLog(0x534e4554, "63146237");
@@ -196,9 +194,7 @@ static void bta_pan_data_buf_ind_cback(UINT16 handle, BD_ADDR src, BD_ADDR dst,
           (UINT8 *)(p_buf + 1) + p_buf->offset, p_buf->len);
           (UINT8 *)(p_buf + 1) + p_buf->offset, p_buf->len);
    p_new_buf->len    = p_buf->len;
    p_new_buf->len    = p_buf->len;
    p_new_buf->offset = sizeof(tBTA_PAN_DATA_PARAMS);
    p_new_buf->offset = sizeof(tBTA_PAN_DATA_PARAMS);
    } else {

        p_new_buf = p_buf;
    }
    /* copy params into the space before the data */
    /* copy params into the space before the data */
    bdcpy(((tBTA_PAN_DATA_PARAMS *)p_new_buf)->src, src);
    bdcpy(((tBTA_PAN_DATA_PARAMS *)p_new_buf)->src, src);
    bdcpy(((tBTA_PAN_DATA_PARAMS *)p_new_buf)->dst, dst);
    bdcpy(((tBTA_PAN_DATA_PARAMS *)p_new_buf)->dst, dst);
+0 −1
Original line number Original line Diff line number Diff line
@@ -667,7 +667,6 @@ static void bnep_data_ind (UINT16 l2cap_cid, BT_HDR *p_buf)
    if (bnep_cb.p_data_buf_cb)
    if (bnep_cb.p_data_buf_cb)
    {
    {
        (*bnep_cb.p_data_buf_cb)(p_bcb->handle, p_src_addr, p_dst_addr, protocol, p_buf, fw_ext_present);
        (*bnep_cb.p_data_buf_cb)(p_bcb->handle, p_src_addr, p_dst_addr, protocol, p_buf, fw_ext_present);
        osi_free(p_buf);
    }
    }
    else if (bnep_cb.p_data_ind_cb)
    else if (bnep_cb.p_data_ind_cb)
    {
    {
+2 −10
Original line number Original line Diff line number Diff line
@@ -629,11 +629,8 @@ void pan_data_buf_ind_cb (UINT16 handle,
            if (pan_cb.pan_data_buf_ind_cb)
            if (pan_cb.pan_data_buf_ind_cb)
                (*pan_cb.pan_data_buf_ind_cb) (pcb->handle, src, dst, protocol, p_buf, ext, forward);
                (*pan_cb.pan_data_buf_ind_cb) (pcb->handle, src, dst, protocol, p_buf, ext, forward);
            else if (pan_cb.pan_data_ind_cb)
            else if (pan_cb.pan_data_ind_cb)
            {
                (*pan_cb.pan_data_ind_cb) (pcb->handle, src, dst, protocol, p_data, len, ext, forward);
                (*pan_cb.pan_data_ind_cb) (pcb->handle, src, dst, protocol, p_data, len, ext, forward);
            osi_free(p_buf);
            osi_free(p_buf);
            }

            return;
            return;
        }
        }


@@ -656,13 +653,8 @@ void pan_data_buf_ind_cb (UINT16 handle,
    if (pan_cb.pan_data_buf_ind_cb)
    if (pan_cb.pan_data_buf_ind_cb)
        (*pan_cb.pan_data_buf_ind_cb) (pcb->handle, src, dst, protocol, p_buf, ext, forward);
        (*pan_cb.pan_data_buf_ind_cb) (pcb->handle, src, dst, protocol, p_buf, ext, forward);
    else if (pan_cb.pan_data_ind_cb)
    else if (pan_cb.pan_data_ind_cb)
    {
        (*pan_cb.pan_data_ind_cb) (pcb->handle, src, dst, protocol, p_data, len, ext, forward);
        (*pan_cb.pan_data_ind_cb) (pcb->handle, src, dst, protocol, p_data, len, ext, forward);
    osi_free(p_buf);
    osi_free(p_buf);
    }
    else
        osi_free(p_buf);

    return;
    return;
}
}