From eaa0bb52dda7dc56ac8d04841d2d29bc31722e3d Mon Sep 17 00:00:00 2001 From: Eduardo Silva Date: Thu, 20 Jul 2023 22:24:52 -0600 Subject: [PATCH] lib: monkey: upgrade to v1.7.1 (fix warnings) Signed-off-by: Eduardo Silva --- lib/monkey/CMakeLists.txt | 2 +- lib/monkey/include/monkey/mk_config.h | 4 ++-- lib/monkey/include/monkey/mk_mimetype.h | 4 ++-- lib/monkey/include/monkey/mk_plugin.h | 4 ++-- lib/monkey/include/monkey/mk_server.h | 4 ++-- lib/monkey/include/monkey/monkey.h | 2 +- lib/monkey/mk_bin/mk_signals.h | 2 +- lib/monkey/mk_server/mk_server.c | 2 -- 8 files changed, 11 insertions(+), 13 deletions(-) diff --git a/lib/monkey/CMakeLists.txt b/lib/monkey/CMakeLists.txt index 198251d8e8e..6211abaaf5a 100644 --- a/lib/monkey/CMakeLists.txt +++ b/lib/monkey/CMakeLists.txt @@ -23,7 +23,7 @@ endif() # Monkey Version set(MK_VERSION_MAJOR 1) set(MK_VERSION_MINOR 7) -set(MK_VERSION_PATCH 0) +set(MK_VERSION_PATCH 1) set(MK_VERSION_STR "${MK_VERSION_MAJOR}.${MK_VERSION_MINOR}.${MK_VERSION_PATCH}") # Output paths diff --git a/lib/monkey/include/monkey/mk_config.h b/lib/monkey/include/monkey/mk_config.h index 349743de9cc..f6552815347 100644 --- a/lib/monkey/include/monkey/mk_config.h +++ b/lib/monkey/include/monkey/mk_config.h @@ -216,8 +216,8 @@ void mk_config_error(const char *path, int line, const char *msg); struct mk_config_listener *mk_config_listener_add(char *address, char *port, int flags, struct mk_server *server); -int mk_config_listen_check_busy(); -void mk_config_listeners_free(); +int mk_config_listen_check_busy(struct mk_server *server); +void mk_config_listeners_free(struct mk_server *server); int mk_config_get_bool(char *value); void mk_config_read_hosts(char *path); diff --git a/lib/monkey/include/monkey/mk_mimetype.h b/lib/monkey/include/monkey/mk_mimetype.h index 71d253f8747..4c45cbde3af 100644 --- a/lib/monkey/include/monkey/mk_mimetype.h +++ b/lib/monkey/include/monkey/mk_mimetype.h @@ -37,9 +37,9 @@ struct mk_mimetype int mk_mimetype_init(struct mk_server *server); int mk_mimetype_add(struct mk_server *server, char *name, const char *type); -int mk_mimetype_read_config(); +int mk_mimetype_read_config(struct mk_server *server); struct mk_mimetype *mk_mimetype_find(struct mk_server *server, mk_ptr_t *filename); struct mk_mimetype *mk_mimetype_lookup(struct mk_server *server, char *name); -void mk_mimetype_free_all(); +void mk_mimetype_free_all(struct mk_server *server); #endif diff --git a/lib/monkey/include/monkey/mk_plugin.h b/lib/monkey/include/monkey/mk_plugin.h index 76d54025d99..c180c143ae5 100644 --- a/lib/monkey/include/monkey/mk_plugin.h +++ b/lib/monkey/include/monkey/mk_plugin.h @@ -273,7 +273,7 @@ struct mk_plugin { /* Init Levels */ int (*master_init) (struct mk_server *); - void (*worker_init) (); + void (*worker_init) (struct mk_server *); /* Callback references for plugin type */ struct mk_plugin_network *network; /* MK_NETWORK_LAYER */ @@ -328,7 +328,7 @@ int mk_plugin_stage_run(unsigned int stage, struct mk_http_session *cs, struct mk_http_request *sr); void mk_plugin_core_process(struct mk_server *server); -void mk_plugin_core_thread(); +void mk_plugin_core_thread(struct mk_server *server); void mk_plugin_preworker_calls(struct mk_server *server); diff --git a/lib/monkey/include/monkey/mk_server.h b/lib/monkey/include/monkey/mk_server.h index a524f18fa67..f84a7d632e2 100644 --- a/lib/monkey/include/monkey/mk_server.h +++ b/lib/monkey/include/monkey/mk_server.h @@ -68,8 +68,8 @@ struct mk_list *mk_server_listen_init(struct mk_server *server); unsigned int mk_server_capacity(struct mk_server *server); void mk_server_launch_workers(struct mk_server *server); void mk_server_worker_loop(struct mk_server *server); -void mk_server_loop_balancer(); -void mk_server_worker_loop(); +void mk_server_loop_balancer(struct mk_server *server); +void mk_server_worker_loop(struct mk_server *server); void mk_server_loop(struct mk_server *server); #endif diff --git a/lib/monkey/include/monkey/monkey.h b/lib/monkey/include/monkey/monkey.h index 8eb28302bf7..0da8901e3ae 100644 --- a/lib/monkey/include/monkey/monkey.h +++ b/lib/monkey/include/monkey/monkey.h @@ -64,7 +64,7 @@ extern const mk_ptr_t mk_monkey_protocol; struct mk_server *mk_server_init(); -void mk_server_info(); +void mk_server_info(struct mk_server *server); int mk_server_setup(struct mk_server *server); void mk_thread_keys_init(); void mk_exit_all(struct mk_server *config); diff --git a/lib/monkey/mk_bin/mk_signals.h b/lib/monkey/mk_bin/mk_signals.h index f0fdc85f19c..a1eb731d544 100644 --- a/lib/monkey/mk_bin/mk_signals.h +++ b/lib/monkey/mk_bin/mk_signals.h @@ -20,7 +20,7 @@ #ifndef MK_SIGNAL_H #define MK_SIGNAL_H -void mk_signal_init(); +void mk_signal_init(struct mk_server *server); void mk_signal_context(struct mk_server *ctx); void mk_signal_thread_sigpipe_safe(void); diff --git a/lib/monkey/mk_server/mk_server.c b/lib/monkey/mk_server/mk_server.c index 557fe8faf24..a84ef448571 100644 --- a/lib/monkey/mk_server/mk_server.c +++ b/lib/monkey/mk_server/mk_server.c @@ -167,7 +167,6 @@ void mk_server_listen_exit(struct mk_list *list) struct mk_list *mk_server_listen_init(struct mk_server *server) { - int i = 0; int server_fd; int reuse_port = MK_FALSE; struct mk_list *head; @@ -254,7 +253,6 @@ struct mk_list *mk_server_listen_init(struct mk_server *server) listen->port); return NULL; } - i += 1; } if (reuse_port == MK_TRUE) {