A bit more accurate, methinks

This commit is contained in:
XANTRONIX Development 2015-07-17 20:21:00 -05:00
parent a3c46b5de6
commit 712b7fbdad

View file

@ -101,7 +101,7 @@ error:
return -1; return -1;
} }
static ssize_t frame_decode_control(patty_ax25_frame *frame, void *data, off_t offset) { static ssize_t frame_decode_payload(patty_ax25_frame *frame, void *data, off_t offset) {
uint8_t control = ((uint8_t *)data + offset)[0]; uint8_t control = ((uint8_t *)data + offset)[0];
size_t decoded = 0; size_t decoded = 0;
@ -189,10 +189,10 @@ int patty_ax25_frame_decode(patty_ax25_frame *frame, void *data, size_t size) {
} }
/* /*
* Now, decode the Control Field, as well as any Protocol Identifier that * Now, decode the remaining Control Field, optional Protocol Identifier
* may follow. * field, and payload that may follow.
*/ */
if ((decoded = frame_decode_control(frame, data, offset)) < 0) { if ((decoded = frame_decode_payload(frame, data, offset)) < 0) {
goto error_decode; goto error_decode;
} else { } else {
offset += decoded; offset += decoded;