mirror of
https://github.com/obgm/libcoap.git
synced 2026-12-06 20:25:51 +03:00
Merge pull request #361 from mrdeep1/block2_well-known_core
Fix final data size in last BLOCK2 response for .well-known/core
This commit is contained in:
2 files changed
+30
-12
No files matched your search
+3
-1
@@ -756,7 +756,7 @@ get_default_port(const coap_uri_t *u) {
|
||||
static int
|
||||
cmdline_uri(char *arg, int create_uri_opts) {
|
||||
unsigned char portbuf[2];
|
||||
#define BUFSIZE 40
|
||||
#define BUFSIZE 100
|
||||
unsigned char _buf[BUFSIZE];
|
||||
unsigned char *buf = _buf;
|
||||
size_t buflen;
|
||||
@@ -807,6 +807,8 @@ cmdline_uri(char *arg, int create_uri_opts) {
|
||||
|
||||
if (uri.path.length) {
|
||||
buflen = BUFSIZE;
|
||||
if (uri.path.length > BUFSIZE)
|
||||
coap_log(LOG_WARNING, "URI path will be truncated (max buffer %d)\n", BUFSIZE);
|
||||
res = coap_split_path(uri.path.s, uri.path.length, buf, &buflen);
|
||||
|
||||
while (res--) {
|
||||
|
||||
Reference in new issue
Block a user