Skip to content

ppp_recv_entry中的PPP_STATE_PREPARE下,丢掉脏数据的处理不合理 #26

Description

@denghengli
    if (device->state == PPP_STATE_PREPARE)
    {
            ......
            /* throw away the dirty data in the uart buffer */
            rt_device_read(device->uart, 0, buffer, PPP_RECV_READ_MAX);
            .....
    }

在ppp_recv_entry中,模块拨号成功后,加了清理脏数据处理。如果真有脏的数据,这样最多也只能清理掉PPP_RECV_READ_MAX(32字节)长度的数据吧,如果RT_SERIAL_RB_BUFSZ比PPP_RECV_READ_MAX大,是清理不干净的

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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