mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-02 16:05:50 +03:00
bugfix
Do not acknowledge responses to NON-confirmable requests, instead response is NON-confirmable as well.
This commit is contained in:
1 parent
b530c25eb9
commit
fbdfa9e4b5
1 file changed
+4
-1
@@ -794,7 +794,10 @@ wellknown_response(coap_context_t *context, coap_pdu_t *request) {
|
||||
size_t len;
|
||||
unsigned char buf[2];
|
||||
|
||||
resp = coap_pdu_init(COAP_MESSAGE_ACK, COAP_RESPONSE_CODE(205),
|
||||
resp = coap_pdu_init(request->hdr->type == COAP_MESSAGE_CON
|
||||
? COAP_MESSAGE_ACK
|
||||
: COAP_MESSAGE_NON,
|
||||
COAP_RESPONSE_CODE(205),
|
||||
request->hdr->id, COAP_MAX_PDU_SIZE);
|
||||
if (!resp)
|
||||
return NULL;
|
||||
|
||||
Reference in new issue
Block a user