automote / ESP-CoAP

This repo contains CoAP protocol for ESP-12E
http://thingtronics.com
GNU General Public License v3.0
71 stars 28 forks source link

Payload length not set to 0 when there is no payload #23

Closed mathrun closed 3 years ago

mathrun commented 3 years ago

Problem,

the packet.payloadlen will not be initialized in coapClient::loop(). When there is a payload it will be set, but it will be a random number else. This might causes problems on developer side when using the client.

Solution: Place packet.payloadlen = 0 somewhere around line 205 in coap_client.cpp.

lovelesh commented 3 years ago

i have made the necessary changes