Riveting commentary
This commit is contained in:
parent
1cccfca835
commit
e7b1c2cf54
1 changed files with 7 additions and 0 deletions
|
@ -210,10 +210,17 @@ ssize_t patty_kiss_tnc_recv(patty_kiss_tnc *tnc, void **frame, int *port) {
|
|||
*/
|
||||
memset(tnc->frame, '\0', tnc->bufsz);
|
||||
|
||||
/*
|
||||
* Try to decode the TNC buffer into the packet.
|
||||
*/
|
||||
if ((decoded = tnc_decode(tnc, tnc->frame, &framelen, port)) < 0) {
|
||||
goto error_io;
|
||||
}
|
||||
|
||||
/*
|
||||
* If we have decoded frame data, then flush the buffer up to the point of
|
||||
* the next frame start, if present.
|
||||
*/
|
||||
if (decoded) {
|
||||
tnc_flush(tnc, decoded);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue