mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-16 21:14:55 +03:00
session, pdu: Enforce maximum message size.
This commit is contained in:
1 parent
c592c9d11f
commit
f81cb43fd3
8 files changed
+26
-32
No files matched your search
@@ -133,7 +133,7 @@ PROCESS_THREAD(coap_server_process, ev, data)
|
||||
|
||||
request = coap_pdu_init(COAP_MESSAGE_CON, COAP_REQUEST_GET,
|
||||
coap_new_message_id(coap_context),
|
||||
COAP_PDU_SIZE_DYNAMIC);
|
||||
COAP_DEFAULT_MTU);
|
||||
|
||||
coap_split_uri((unsigned char *)resource, strlen(resource), &uri);
|
||||
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ make_pdu( unsigned int value ) {
|
||||
static unsigned char buf[20];
|
||||
int len, ls;
|
||||
|
||||
if (!(pdu = coap_pdu_init(0, 0, 0, COAP_PDU_SIZE_DYNAMIC)))
|
||||
if (!(pdu = coap_pdu_init(0, 0, 0, COAP_DEFAULT_MTU)))
|
||||
return NULL;
|
||||
|
||||
pdu->type = COAP_MESSAGE_NON;
|
||||
|
||||
Reference in new issue
Block a user