Skip to content

Commit

Permalink
Fix bug in which ENOACK was not correctly being returned.
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-levis committed Feb 28, 2018
1 parent 883e7b5 commit ff13357
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion userland/libtock/ieee802154.c
Expand Up @@ -327,7 +327,14 @@ int ieee802154_send(unsigned short addr,
err = command(RADIO_DRIVER, COMMAND_SEND, (unsigned int) addr, 0);
if (err < 0) return err;
yield_for(&tx_done);
return tx_result;
if (tx_result != TOCK_SUCCESS) {
return tx_result;
} else if (tx_acked == 0) {
return TOCK_ENOACK;
} else {
return TOCK_SUCCESS;
}

}

// Internal callback for receive
Expand Down

0 comments on commit ff13357

Please sign in to comment.