Skip to content

Commit

Permalink
Fix inconsistent tokens received by other servers
Browse files Browse the repository at this point in the history
When use `coap-client` with -T command, the other server received inconsistent.
```
coap-client send token "aaa", the other server received "aab"
coap-client send token "obstoken", the other server received "obstokeo"
```
  • Loading branch information
cisiqo authored and mrdeep1 committed Nov 7, 2023
1 parent ecc5554 commit 1456d9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/coap_session.c
Original file line number Diff line number Diff line change
Expand Up @@ -1583,7 +1583,7 @@ void
coap_session_new_token(coap_session_t *session, size_t *len,
uint8_t *data) {
*len = coap_encode_var_safe8(data,
sizeof(session->tx_token), ++session->tx_token);
sizeof(session->tx_token), session->tx_token++);
}

uint16_t
Expand Down

0 comments on commit 1456d9a

Please sign in to comment.