mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-20 06:29:04 +03:00
coap_block.c: Support 16 bit size_t in coap_context_set_max_block_size()
Allows RIOT to compile with 16 bit size_t processors.
This commit is contained in:
1 parent
b14521d555
commit
5d77688f2d
4 files changed
+3
-3
No files matched your search
@@ -90,6 +90,7 @@ examples/coap-server-*
|
||||
examples/coap-tiny
|
||||
examples/oscore-interop-server
|
||||
examples/*.exe
|
||||
examples/riot/pkg_libcoap/patches
|
||||
|
||||
# the include/ folder
|
||||
include/coap3/coap.h
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
PKG_NAME=libcoap
|
||||
PKG_URL=https://github.com/obgm/libcoap
|
||||
PKG_VERSION=214665ac4b44b1b6a7e38d4d6907ee835a174928
|
||||
PKG_VERSION=e599e25d6e2b0d0e7b29dc2710f2f15e0b7e5e51
|
||||
PKG_LICENSE=BSD-2-Clause
|
||||
|
||||
LIBCOAP_BUILD_DIR=$(BINDIR)/pkg/$(PKG_NAME)
|
||||
|
||||
@@ -204,7 +204,6 @@ coap_client_init(coap_context_t *ctx)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
||||
if (uri.scheme == COAP_URI_SCHEME_COAP) {
|
||||
session = coap_new_client_session(ctx, NULL, &dst,
|
||||
COAP_PROTO_UDP);
|
||||
|
||||
+1
-1
@@ -409,7 +409,7 @@ coap_context_set_max_block_size(coap_context_t *context, size_t max_block_size)
|
||||
coap_lock_check_locked(context);
|
||||
max_block_size = (coap_fls((uint32_t)max_block_size >> 4) - 1) & 0x07;
|
||||
context->block_mode &= ~COAP_BLOCK_MAX_SIZE_MASK;
|
||||
context->block_mode |= COAP_BLOCK_MAX_SIZE_SET(max_block_size);
|
||||
context->block_mode |= COAP_BLOCK_MAX_SIZE_SET((uint32_t)max_block_size);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user