Skip to content
Snippets Groups Projects
Unverified Commit a8c2de12 authored by Kaspar Schleiser's avatar Kaspar Schleiser Committed by GitHub
Browse files

Merge pull request #9870 from bergzand/pr/ethos/fix_recv_with_drop

ethos: Add drop frame case to recv function
parents ed1eb8ed 761987ef
No related branches found
No related tags found
No related merge requests found
...@@ -314,7 +314,14 @@ static int _recv(netdev_t *netdev, void *buf, size_t len, void* info) ...@@ -314,7 +314,14 @@ static int _recv(netdev_t *netdev, void *buf, size_t len, void* info)
return (int)len; return (int)len;
} }
else { else {
return dev->last_framesize; if (len) {
int dropsize = dev->last_framesize;
dev->last_framesize = 0;
return tsrb_drop(&dev->inbuf, dropsize);
}
else {
return dev->last_framesize;
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment