From 21eed65a60e4530d67fb71fbcd5c645fc79e5772 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com> Date: Thu, 9 Apr 2026 21:39:00 +0200 Subject: [PATCH] Fix typos Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com> --- src/main.h | 2 +- src/sec-mod.c | 14 +++++++------- src/worker-http.c | 14 +++++++------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/main.h b/src/main.h index 33c04917..54d1f81f 100644 --- a/src/main.h +++ b/src/main.h @@ -50,7 +50,7 @@ extern int saved_argc; extern char **saved_argv; extern struct ev_loop *main_loop; -extern ev_timer maintainance_watcher; +extern ev_timer maintenance_watcher; #include "log.h" diff --git a/src/sec-mod.c b/src/sec-mod.c index 50436154..acb7a9d1 100644 --- a/src/sec-mod.c +++ b/src/sec-mod.c @@ -49,9 +49,9 @@ #include #include "log.h" -#define MAINTAINANCE_TIME 310 +#define MAINTENANCE_TIME 310 -static int need_maintainance; +static int need_maintenance; static int need_reload; static int need_exit; @@ -626,7 +626,7 @@ static int process_packet_from_main(void *pool, int fd, sec_mod_st *sec, static void handle_alarm(int signo) { - need_maintainance = 1; + need_maintenance = 1; } static void handle_sigterm(int signo) @@ -713,15 +713,15 @@ static void check_other_work(sec_mod_st *sec) reload_server(sec); } - if (need_maintainance) { + if (need_maintenance) { seclog(sec, LOG_DEBUG, "performing maintenance"); cleanup_client_entries(sec); expire_tls_sessions(sec); send_stats_to_main(sec); seclog(sec, LOG_DEBUG, "active sessions %d", sec_mod_client_db_elems(sec)); - alarm(MAINTAINANCE_TIME); - need_maintainance = 0; + alarm(MAINTENANCE_TIME); + need_maintenance = 0; } } @@ -1096,7 +1096,7 @@ void sec_mod_server(void *main_pool, void *config_pool, } sigprocmask(SIG_BLOCK, &blockset, &sig_default_set); - alarm(MAINTAINANCE_TIME); + alarm(MAINTENANCE_TIME); seclog(sec, LOG_INFO, "sec-mod initialized (socket: %s)", SOCKET_FILE); for (;;) { diff --git a/src/worker-http.c b/src/worker-http.c index 06b97a8d..386a2f89 100644 --- a/src/worker-http.c +++ b/src/worker-http.c @@ -195,10 +195,10 @@ static const dtls_ciphersuite_st ciphersuites12[] = { }; #define STR_ST(x) { .data = (uint8_t *)x, .length = sizeof(x) - 1 } -static const str_st sensitve_http_headers[] = { STR_ST("Cookie"), - STR_ST("X-DTLS-Master-Secret"), - STR_ST("Authorization"), - { NULL, 0 } }; +static const str_st sensitive_http_headers[] = { STR_ST("Cookie"), + STR_ST("X-DTLS-Master-Secret"), + STR_ST("Authorization"), + { NULL, 0 } }; #ifdef HAVE_LZ4 /* Wrappers over LZ4 functions */ @@ -279,10 +279,10 @@ static bool header_is_sensitive(str_st *header) { size_t i; - for (i = 0; sensitve_http_headers[i].length != 0; i++) { - if ((header->length == sensitve_http_headers[i].length) && + for (i = 0; sensitive_http_headers[i].length != 0; i++) { + if ((header->length == sensitive_http_headers[i].length) && (strncasecmp((char *)header->data, - (char *)sensitve_http_headers[i].data, + (char *)sensitive_http_headers[i].data, header->length) == 0)) return true; }