mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-21 06:49:05 +03:00
LwIP: Fix TCP support
This commit is contained in:
1 parent
07c880b56e
commit
60e9f08e47
2 files changed
+5
-1
No files matched your search
@@ -75,7 +75,7 @@
|
||||
|
||||
#ifndef COAP_DEFAULT_MAX_PDU_RX_SIZE
|
||||
#if defined(WITH_LWIP)
|
||||
#define COAP_DEFAULT_MAX_PDU_RX_SIZE (COAP_MAX_MESSAGE_SIZE_TCP16+4UL)
|
||||
#define COAP_DEFAULT_MAX_PDU_RX_SIZE (COAP_MAX_MESSAGE_SIZE_TCP16+6UL)
|
||||
#elif defined(WITH_CONTIKI)
|
||||
#define COAP_DEFAULT_MAX_PDU_RX_SIZE (UIP_APPDATA_SIZE)
|
||||
#elif (UINT_MAX < (8UL*1024*1024+256))
|
||||
|
||||
@@ -2053,6 +2053,8 @@ coap_new_client_session_pki_lkd(coap_context_t *ctx,
|
||||
coap_session_t *
|
||||
coap_new_server_session(coap_context_t *ctx, coap_endpoint_t *ep, void *extra) {
|
||||
coap_session_t *session;
|
||||
coap_tick_t now;
|
||||
|
||||
session = coap_make_session(ep->proto, COAP_SESSION_TYPE_SERVER,
|
||||
NULL, NULL, NULL, 0, ctx, ep);
|
||||
if (!session)
|
||||
@@ -2072,6 +2074,8 @@ coap_new_server_session(coap_context_t *ctx, coap_endpoint_t *ep, void *extra) {
|
||||
#endif /* COAP_EPOLL_SUPPORT */
|
||||
SESSIONS_ADD(ep->sessions, session);
|
||||
if (session) {
|
||||
coap_ticks(&now);
|
||||
session->last_rx_tx = now;
|
||||
coap_log_debug("***%s: session %p: new incoming session\n",
|
||||
coap_session_str(session), (void *)session);
|
||||
coap_handle_event_lkd(session->context, COAP_EVENT_TCP_CONNECTED, session);
|
||||
|
||||
Reference in new issue
Block a user