Clear rxhead on disconnect to prevent data from being resent on re-connect
This commit is contained in:
parent
94259f725e
commit
2e08560fa0
|
@ -1642,6 +1642,7 @@ static void cdcacm_disconnect(FAR struct usbdevclass_driver_s *driver,
|
|||
|
||||
priv->serdev.xmit.head = 0;
|
||||
priv->serdev.xmit.tail = 0;
|
||||
priv->rxhead = 0;
|
||||
irqrestore(flags);
|
||||
|
||||
/* 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.tail = 0;
|
||||
priv->rxhead = 0;
|
||||
irqrestore(flags);
|
||||
|
||||
/* Perform the soft connect function so that we will we can be
|
||||
|
|
Loading…
Reference in New Issue