net: coap: Use correct network buffer in registration
Need to use the network buffer when sending CoAP serial message because the message was constructed to net_buf. Change-Id: I9422ff3f5f93945f1f9f91f2ed8572e3715338ce Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
This commit is contained in:
parent
b650e8edb1
commit
6d740fd4ca
1 changed files with 1 additions and 1 deletions
|
@ -334,7 +334,7 @@ coap_obs_request_registration(coap_context_t *coap_ctx,
|
||||||
if(obs) {
|
if(obs) {
|
||||||
t->callback = handle_obs_registration_response;
|
t->callback = handle_obs_registration_response;
|
||||||
t->callback_data = obs;
|
t->callback_data = obs;
|
||||||
t->packet_len = coap_serialize_message(request, t->packet);
|
t->packet_len = coap_serialize_message(request, uip_appdata(coap_ctx->buf));
|
||||||
uip_len(coap_ctx->buf) = t->packet_len;
|
uip_len(coap_ctx->buf) = t->packet_len;
|
||||||
net_buf_add(coap_ctx->buf, uip_len(coap_ctx->buf));
|
net_buf_add(coap_ctx->buf, uip_len(coap_ctx->buf));
|
||||||
coap_send_transaction(t);
|
coap_send_transaction(t);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue