Skip to content

Commit

Permalink
Stop clearing request's memory
Browse files Browse the repository at this point in the history
Clearing packetbuf wipes out data for the request packet. After memset
the request token is lost and it cannot be copied to the response.
  • Loading branch information
mbialon committed Jan 26, 2015
1 parent 6aea9ea commit 3cf97f9
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion microcoap.ino
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ void loop()
coap_packet_t rsppkt;
coap_handle_req(&scratch_buf, &pkt, &rsppkt);

memset(packetbuf, 0, UDP_TX_PACKET_MAX_SIZE);
if (0 != (rc = coap_build(packetbuf, &rsplen, &rsppkt)))
{
Serial.print("coap_build failed rc=");
Expand Down

0 comments on commit 3cf97f9

Please sign in to comment.