Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nanocoap: add coap_get_token() #17976

Merged
merged 3 commits into from
Apr 22, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
nanocoap: make use of coap_get_token()
  • Loading branch information
benpicco committed Apr 21, 2022
commit c4f6249992740a3628ec9a16088688b994055d80
2 changes: 1 addition & 1 deletion sys/net/application_layer/nanocoap/nanocoap.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ ssize_t coap_build_reply(coap_pkt_t *pkt, unsigned code,
}
}

coap_build_hdr((coap_hdr_t *)rbuf, type, pkt->token, tkl, code,
coap_build_hdr((coap_hdr_t *)rbuf, type, coap_get_token(pkt), tkl, code,
ntohs(pkt->hdr->id));
coap_hdr_set_type((coap_hdr_t *)rbuf, type);
coap_hdr_set_code((coap_hdr_t *)rbuf, code);
Expand Down