mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-26 00:41:42 +03:00
add COAP_BLOCK_FORCE_Q_BLOCK
This commit is contained in:
1 parent
48a1b83100
commit
da1be4b5ca
9 files changed
+22
-5
No files matched your search
+1
-1
@@ -422,7 +422,7 @@ coap_context_set_block_mode_lkd(coap_context_t *context,
|
||||
context->block_mode &= ~COAP_BLOCK_SET_MASK;
|
||||
context->block_mode |= block_mode & COAP_BLOCK_SET_MASK;
|
||||
#if ! COAP_Q_BLOCK_SUPPORT
|
||||
if (block_mode & (COAP_BLOCK_TRY_Q_BLOCK|COAP_BLOCK_USE_M_Q_BLOCK))
|
||||
if (block_mode & (COAP_BLOCK_TRY_Q_BLOCK|COAP_BLOCK_USE_M_Q_BLOCK|COAP_BLOCK_FORCE_Q_BLOCK))
|
||||
coap_log_debug("Q-Block support not compiled in - ignored\n");
|
||||
#endif /* ! COAP_Q_BLOCK_SUPPORT */
|
||||
}
|
||||
|
||||
@@ -475,6 +475,11 @@ coap_make_session(coap_proto_t proto, coap_session_type_t type,
|
||||
#endif /* COAP_SERVER_SUPPORT */
|
||||
coap_session_set_mtu(session, COAP_DEFAULT_MTU);
|
||||
session->block_mode = context->block_mode;
|
||||
#if COAP_Q_BLOCK_SUPPORT
|
||||
if (session->block_mode & COAP_BLOCK_FORCE_Q_BLOCK) {
|
||||
set_block_mode_has_q(session->block_mode);
|
||||
}
|
||||
#endif
|
||||
if (proto == COAP_PROTO_DTLS) {
|
||||
session->tls_overhead = 29;
|
||||
if (session->tls_overhead >= session->mtu) {
|
||||
|
||||
Reference in new issue
Block a user