Skip to content

Commit

Permalink
dtls: Raise default number of connections
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysn committed Feb 28, 2023
1 parent 8e3a266 commit f0e68aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/tinydtls/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ config DTLS_CONTEXT_MAX

config DTLS_PEER_MAX
int "Max number of peers"
default 2 if KCONFIG_USEMODULE_GCOAP_DTLS
default 1
help
The maximum number of DTLS peers.
Expand Down
6 changes: 6 additions & 0 deletions sys/include/net/dtls.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
#ifndef NET_DTLS_H
#define NET_DTLS_H

#include "modules.h"

#ifdef __cplusplus
extern "C" {
#endif
Expand All @@ -44,8 +46,12 @@ extern "C" {
* @brief The maximum number DTLS peers (i.e. sessions)
*/
#ifndef CONFIG_DTLS_PEER_MAX
#if IS_USED(MODULE_GCOAP_DTLS)
#define CONFIG_DTLS_PEER_MAX (2)
#else
#define CONFIG_DTLS_PEER_MAX (1)
#endif
#endif

#ifdef __cplusplus
}
Expand Down

0 comments on commit f0e68aa

Please sign in to comment.