mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-11-19 03:05:14 +00:00
framer-802154: Renamed variable for the sake of consistency
This commit is contained in:
parent
1d324e50d2
commit
11495a011c
@ -90,7 +90,7 @@ static int
|
||||
create_frame(int type, int do_create)
|
||||
{
|
||||
frame802154_t params;
|
||||
int len;
|
||||
int hdr_len;
|
||||
|
||||
/* init to zeros */
|
||||
memset(¶ms, 0, sizeof(params));
|
||||
@ -183,21 +183,21 @@ create_frame(int type, int do_create)
|
||||
|
||||
params.payload = packetbuf_dataptr();
|
||||
params.payload_len = packetbuf_datalen();
|
||||
len = frame802154_hdrlen(¶ms);
|
||||
hdr_len = frame802154_hdrlen(¶ms);
|
||||
if(!do_create) {
|
||||
/* Only calculate header length */
|
||||
return len;
|
||||
return hdr_len;
|
||||
|
||||
} else if(packetbuf_hdralloc(len)) {
|
||||
frame802154_create(¶ms, packetbuf_hdrptr(), len);
|
||||
} else if(packetbuf_hdralloc(hdr_len)) {
|
||||
frame802154_create(¶ms, packetbuf_hdrptr(), hdr_len);
|
||||
|
||||
PRINTF("15.4-OUT: %2X", params.fcf.frame_type);
|
||||
PRINTADDR(params.dest_addr);
|
||||
PRINTF("%d %u (%u)\n", len, packetbuf_datalen(), packetbuf_totlen());
|
||||
PRINTF("%d %u (%u)\n", hdr_len, packetbuf_datalen(), packetbuf_totlen());
|
||||
|
||||
return len;
|
||||
return hdr_len;
|
||||
} else {
|
||||
PRINTF("15.4-OUT: too large header: %u\n", len);
|
||||
PRINTF("15.4-OUT: too large header: %u\n", hdr_len);
|
||||
return FRAMER_FAILED;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user