1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-31 17:31:18 +01:00

Merge pull request #20159 from benpicco/pkg/tinydtls-bump

pkg/tinydtls: bump version
This commit is contained in:
Marian Buschsieweke 2023-12-06 20:45:02 +00:00 committed by GitHub
commit 4aa0097100
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 97 deletions

View File

@ -1,6 +1,6 @@
PKG_NAME=tinydtls
PKG_URL=https://github.com/eclipse/tinydtls.git
PKG_VERSION=5e14e4930b0f329f35809c623976df1e08ca4593
PKG_VERSION=95d02ee28ea745541d6c55dba49f3b3ab8b71a43
PKG_LICENSE=EPL-1.0,EDL-1.0
include $(RIOTBASE)/pkg/pkg.mk

View File

@ -137,9 +137,6 @@ static int _event(struct dtls_context_t *ctx, session_t *session,
case DTLS_EVENT_CONNECTED:
DEBUG("sock_dtls: event connected\n");
break;
case DTLS_EVENT_RENEGOTIATE:
DEBUG("sock_dtls: event renegotiate\n");
break;
}
}
if (!level && (code != DTLS_EVENT_CONNECT)) {

View File

@ -1,93 +0,0 @@
From 3eade60499185b40c0593774af52dbe42042a939 Mon Sep 17 00:00:00 2001
From: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Date: Mon, 27 Feb 2023 16:37:14 +0100
Subject: [PATCH] dtls_debug: mock dsrv_log() when NDEBUG is set
Setting NDEBUG already replaces dtls_dsrv_hexdump_log(), dtls_dsrv_log_addr()
etc with dummy implementations.
This extends this to also replace dsrv_log() and dtls_{get,set}_log_level()
with a no-op implementation.
---
dtls_debug.c | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/dtls_debug.c b/dtls_debug.c
index 70c88ff..e7a9902 100644
--- a/dtls_debug.c
+++ b/dtls_debug.c
@@ -51,8 +51,6 @@ typedef int in_port_t;
LOG_MODULE_REGISTER(TINYDTLS, CONFIG_TINYDTLS_LOG_LEVEL);
#endif /* WITH_ZEPHYR */
-static int maxlog = DTLS_LOG_WARN; /* default maximum log level */
-
const char *dtls_package_name(void) {
return PACKAGE_NAME;
}
@@ -61,6 +59,9 @@ const char *dtls_package_version(void) {
return PACKAGE_VERSION;
}
+#ifndef NDEBUG
+static int maxlog = DTLS_LOG_WARN; /* default maximum log level */
+
log_t
dtls_get_log_level(void) {
return maxlog;
@@ -101,8 +102,6 @@ print_timestamp(char *s, size_t len, clock_time_t t) {
#endif /* HAVE_TIME_H */
-#ifndef NDEBUG
-
/**
* A length-safe strlen() fake.
*
@@ -240,8 +239,6 @@ dsrv_print_addr(const session_t *addr, char *buf, size_t len) {
#endif /* ! HAVE_INET_NTOP */
}
-#endif /* NDEBUG */
-
#if !defined(WITH_CONTIKI) && !defined(_MSC_VER)
static void
@@ -332,7 +329,6 @@ dsrv_log(log_t level, char *format, ...) {
}
#endif /* WITH_CONTIKI */
-#ifndef NDEBUG
/** dumps packets in usual hexdump format */
void hexdump(const unsigned char *packet, int length) {
int n = 0;
@@ -497,6 +493,16 @@ dtls_dsrv_hexdump_log(log_t level, const char *name, const unsigned char *buf, s
#else /* NDEBUG */
+log_t
+dtls_get_log_level(void) {
+ return 0;
+}
+
+void
+dtls_set_log_level(log_t level) {
+ (void)level;
+}
+
void
hexdump(const unsigned char *packet, int length) {
(void)packet;
@@ -518,6 +524,12 @@ dtls_dsrv_hexdump_log(log_t level, const char *name, const unsigned char *buf, s
(void)extend;
}
+void
+dsrv_log(log_t level, const char *format, ...) {
+ (void)level;
+ (void)format;
+}
+
void
dtls_dsrv_log_addr(log_t level, const char *name, const session_t *addr) {
(void)level;