mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 13:27:01 +08:00
Clear rxhead on disconnect to prevent data from being resent on re-connect
This commit is contained in:
@@ -1642,6 +1642,7 @@ static void cdcacm_disconnect(FAR struct usbdevclass_driver_s *driver,
|
|||||||
|
|
||||||
priv->serdev.xmit.head = 0;
|
priv->serdev.xmit.head = 0;
|
||||||
priv->serdev.xmit.tail = 0;
|
priv->serdev.xmit.tail = 0;
|
||||||
|
priv->rxhead = 0;
|
||||||
irqrestore(flags);
|
irqrestore(flags);
|
||||||
|
|
||||||
/* Perform the soft connect function so that we will we can be
|
/* Perform the soft connect function so that we will we can be
|
||||||
|
|||||||
@@ -1907,6 +1907,7 @@ static void usbclass_disconnect(FAR struct usbdevclass_driver_s *driver,
|
|||||||
|
|
||||||
priv->serdev.xmit.head = 0;
|
priv->serdev.xmit.head = 0;
|
||||||
priv->serdev.xmit.tail = 0;
|
priv->serdev.xmit.tail = 0;
|
||||||
|
priv->rxhead = 0;
|
||||||
irqrestore(flags);
|
irqrestore(flags);
|
||||||
|
|
||||||
/* Perform the soft connect function so that we will we can be
|
/* Perform the soft connect function so that we will we can be
|
||||||
|
|||||||
Reference in New Issue
Block a user