mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-03 11:30:53 +00:00
avoid gcc optimization bug by extracting struct values
This commit is contained in:
parent
b22ced2ef0
commit
076c208b72
@ -420,6 +420,7 @@ send_packet(void)
|
||||
uint8_t strobe[MAX_STROBE_SIZE];
|
||||
int strobe_len, len;
|
||||
int is_broadcast = 0;
|
||||
int is_dispatch, is_strobe_ack;
|
||||
/*int is_reliable;*/
|
||||
struct encounter *e;
|
||||
struct queuebuf *packet;
|
||||
@ -566,7 +567,9 @@ send_packet(void)
|
||||
packetbuf_set_datalen(len);
|
||||
if(NETSTACK_FRAMER.parse() >= 0) {
|
||||
hdr = packetbuf_dataptr();
|
||||
if(hdr->dispatch == DISPATCH && hdr->type == TYPE_STROBE_ACK) {
|
||||
is_dispatch = hdr->dispatch == DISPATCH;
|
||||
is_strobe_ack = hdr->type == TYPE_STROBE_ACK;
|
||||
if(is_dispatch && is_strobe_ack) {
|
||||
if(rimeaddr_cmp(packetbuf_addr(PACKETBUF_ADDR_RECEIVER),
|
||||
&rimeaddr_node_addr)) {
|
||||
/* We got an ACK from the receiver, so we can immediately send
|
||||
|
Loading…
Reference in New Issue
Block a user