Skip to content

[npl] ble_npl_eventq_remove() 函数隐患 #18

@Jackistang

Description

@Jackistang

nimble ble_npl_eventq_remove() 函数仅从事件队列里移除某一个事件,而移植实现里复位清空了整个消息队列,这个是有隐患的,可能会导致协议栈工作不正常,需要修改。

void ble_npl_eventq_remove(struct ble_npl_eventq *evq, struct ble_npl_event *ev)
{
    if (!ev->queued)
    {
        return;
    }

    rt_mq_control((struct rt_messagequeue *)evq->q, RT_IPC_CMD_RESET, RT_NULL);
    ev->queued = false;
}

而且这个函数在 controller 和 host 里都有应用:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions