Clear rxhead on disconnect to prevent data from being resent on re-connect

This commit is contained in:
Gregory Nutt 2014-06-06 10:34:58 -06:00
parent 94259f725e
commit 2e08560fa0
2 changed files with 2 additions and 0 deletions

View File

@ -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

View File

@ -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