Skip to content

Commit

Permalink
Better handling of message length
Browse files Browse the repository at this point in the history
  • Loading branch information
podhrmic committed Nov 26, 2017
1 parent b255209 commit 3bb7608
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/v1.0/C/secure_pprz_transport.c
Expand Up @@ -209,6 +209,9 @@ static void end_message(struct spprz_transport *trans, struct link_device *dev,
* NOTE: USE WITH CARE!
*/
extern void spprz_send_plaintext(struct link_device *dev, struct spprz_transport *trans){
// update the message length
trans->tx_idx = trans->tx_idx + trans->tx_msg.msg_idx;

// initialize checksum
trans->ck_a_tx = trans->tx_buffer[PPRZ_MSG_LEN_IDX];
trans->ck_b_tx = trans->tx_buffer[PPRZ_MSG_LEN_IDX];
Expand Down

0 comments on commit 3bb7608

Please sign in to comment.