Skip to content

Commit

Permalink
lib: monkey: upgrade to v1.7.1 (fix warnings)
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Silva <[email protected]>
  • Loading branch information
edsiper committed Jul 21, 2023
1 parent 100d8c8 commit eaa0bb5
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion lib/monkey/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/monkey/include/monkey/mk_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions lib/monkey/include/monkey/mk_mimetype.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions lib/monkey/include/monkey/mk_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions lib/monkey/include/monkey/mk_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion lib/monkey/include/monkey/monkey.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion lib/monkey/mk_bin/mk_signals.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 0 additions & 2 deletions lib/monkey/mk_server/mk_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit eaa0bb5

Please sign in to comment.