No need to make a big fuss
This commit is contained in:
parent
eb261c9890
commit
d5ee0c7a9e
2 changed files with 10 additions and 16 deletions
|
@ -66,12 +66,8 @@ ssize_t patty_ax25_frame_decode(patty_ax25_frame *frame,
|
|||
size_t len);
|
||||
|
||||
ssize_t patty_ax25_frame_encode(patty_ax25_frame *frame,
|
||||
void *buf,
|
||||
enum patty_ax25_frame_format format,
|
||||
uint16_t control,
|
||||
uint8_t proto,
|
||||
void *info,
|
||||
size_t infolen,
|
||||
void *buf,
|
||||
size_t len);
|
||||
|
||||
ssize_t patty_ax25_frame_encode_reply_to(patty_ax25_frame *frame,
|
||||
|
|
20
src/frame.c
20
src/frame.c
|
@ -289,21 +289,19 @@ error_toobig:
|
|||
}
|
||||
|
||||
ssize_t patty_ax25_frame_encode(patty_ax25_frame *frame,
|
||||
void *buf,
|
||||
enum patty_ax25_frame_format format,
|
||||
uint16_t control,
|
||||
uint8_t proto,
|
||||
void *info,
|
||||
size_t infolen,
|
||||
void *buf,
|
||||
size_t len) {
|
||||
size_t offset;
|
||||
|
||||
offset = encode_address(buf,
|
||||
&frame->dest,
|
||||
&frame->src,
|
||||
frame->repeaters,
|
||||
frame->hops,
|
||||
len);
|
||||
if ((offset = encode_address(buf,
|
||||
&frame->dest,
|
||||
&frame->src,
|
||||
frame->repeaters,
|
||||
frame->hops,
|
||||
len)) < 0) {
|
||||
goto error_toobig;
|
||||
}
|
||||
|
||||
switch (format) {
|
||||
case PATTY_AX25_FRAME_NORMAL:
|
||||
|
|
Loading…
Add table
Reference in a new issue