Fix inconsistent tokens received by other servers

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"
```
This commit is contained in:
chengshq authored and Jon Shallow committed 2023-11-07 09:26:27 +00:00
1 parent ecc55544d6
commit 1456d9aa0d
1 file changed
+1 -1
+1 -1
View File
@@ -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