diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-03-18 18:56:33 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-03-18 18:56:33 +0000 |
commit | 14c13854d3cae9d93c3d148be30fb72f1eaffe55 (patch) | |
tree | 7b1a3e41b75490fac4d45722c90a1847543c6796 /src/rspamd.h | |
parent | 6b2b4167187fee09365271cca182866ecb029af3 (diff) | |
download | rspamd-14c13854d3cae9d93c3d148be30fb72f1eaffe55.tar.gz rspamd-14c13854d3cae9d93c3d148be30fb72f1eaffe55.zip |
[Rework] Further types conversion (no functional changes)
Diffstat (limited to 'src/rspamd.h')
-rw-r--r-- | src/rspamd.h | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/src/rspamd.h b/src/rspamd.h index f9a2d3c0b..60613ce0a 100644 --- a/src/rspamd.h +++ b/src/rspamd.h @@ -102,21 +102,21 @@ enum rspamd_worker_state { struct rspamd_worker { pid_t pid; /**< pid of worker */ pid_t ppid; /**< pid of parent */ - guint index; /**< index number */ - guint nconns; /**< current connections count */ + unsigned int index; /**< index number */ + unsigned int nconns; /**< current connections count */ enum rspamd_worker_state state; /**< current worker state */ gboolean cores_throttled; /**< set to true if cores throttling took place */ - gdouble start_time; /**< start time */ + double start_time; /**< start time */ struct rspamd_main *srv; /**< pointer to server structure */ GQuark type; /**< process type */ GHashTable *signal_events; /**< signal events */ struct rspamd_worker_accept_event *accept_events; /**< socket events */ struct rspamd_worker_conf *cf; /**< worker config data */ gpointer ctx; /**< worker's specific data */ - gint flags; /**< worker's flags (enum rspamd_worker_flags) */ - gint control_pipe[2]; /**< control pipe. [0] is used by main process, + int flags; /**< worker's flags (enum rspamd_worker_flags) */ + int control_pipe[2]; /**< control pipe. [0] is used by main process, [1] is used by a worker */ - gint srv_pipe[2]; /**< used by workers to request something from the + int srv_pipe[2]; /**< used by workers to request something from the main process. [0] - main, [1] - worker */ ev_io srv_ev; /**< used by main for read workers' requests */ struct rspamd_worker_heartbeat hb; /**< heartbeat data */ @@ -150,7 +150,7 @@ struct rspamd_worker_signal_handler_elt { }; struct rspamd_worker_signal_handler { - gint signo; + int signo; gboolean enabled; ev_signal ev_sig; struct ev_loop *event_loop; @@ -164,9 +164,9 @@ struct rspamd_worker_signal_handler { struct module_s; struct module_ctx { - gint (*filter)(struct rspamd_task *task); /**< pointer to headers process function */ - struct module_s *mod; /**< module pointer */ - gboolean enabled; /**< true if module is enabled in configuration */ + int (*filter)(struct rspamd_task *task); /**< pointer to headers process function */ + struct module_s *mod; /**< module pointer */ + gboolean enabled; /**< true if module is enabled in configuration */ }; #ifndef WITH_HYPERSCAN @@ -209,7 +209,7 @@ struct module_ctx { * Module */ typedef struct module_s { - const gchar *name; + const char *name; int (*module_init_func)(struct rspamd_config *cfg, struct module_ctx **ctx); @@ -220,10 +220,10 @@ typedef struct module_s { int (*module_attach_controller_func)(struct module_ctx *ctx, GHashTable *custom_commands); - guint module_version; + unsigned int module_version; uint64_t rspamd_version; - const gchar *rspamd_features; - guint ctx_offset; + const char *rspamd_features; + unsigned int ctx_offset; } module_t; enum rspamd_worker_socket_type { @@ -234,13 +234,13 @@ enum rspamd_worker_socket_type { struct rspamd_worker_listen_socket { const rspamd_inet_addr_t *addr; - gint fd; + int fd; enum rspamd_worker_socket_type type; bool is_systemd; }; typedef struct worker_s { - const gchar *name; + const char *name; gpointer (*worker_init_func)(struct rspamd_config *cfg); @@ -248,9 +248,9 @@ typedef struct worker_s { int flags; int listen_type; - guint worker_version; + unsigned int worker_version; uint64_t rspamd_version; - const gchar *rspamd_features; + const char *rspamd_features; } worker_t; /** @@ -288,12 +288,12 @@ struct RSPAMD_ALIGNED(64) rspamd_avg_time { * Server statistics */ struct RSPAMD_ALIGNED(64) rspamd_stat { - guint messages_scanned; /**< total number of messages scanned */ - guint actions_stat[METRIC_ACTION_MAX]; /**< statistic for each action */ - guint connections_count; /**< total connections count */ - guint control_connections_count; /**< connections count to control interface */ - guint messages_learned; /**< messages learned */ - struct rspamd_avg_time avg_time; /**< average time stats */ + unsigned int messages_scanned; /**< total number of messages scanned */ + unsigned int actions_stat[METRIC_ACTION_MAX]; /**< statistic for each action */ + unsigned int connections_count; /**< total connections count */ + unsigned int control_connections_count; /**< connections count to control interface */ + unsigned int messages_learned; /**< messages learned */ + struct rspamd_avg_time avg_time; /**< average time stats */ }; /** @@ -329,12 +329,12 @@ struct rspamd_main { struct controller_command; struct controller_session; -typedef gboolean (*controller_func_t)(gchar **args, +typedef gboolean (*controller_func_t)(char **args, struct controller_session *session); struct controller_session { struct rspamd_worker *worker; /**< pointer to worker structure (controller in fact) */ - gint sock; /**< socket descriptor */ + int sock; /**< socket descriptor */ struct controller_command *cmd; /**< real command */ struct rspamd_config *cfg; /**< pointer to config file */ GList *parts; /**< extracted mime parts */ @@ -346,7 +346,7 @@ struct controller_session { struct zstd_dictionary { void *dict; gsize size; - guint id; + unsigned int id; }; struct rspamd_external_libs_ctx { @@ -366,7 +366,7 @@ struct rspamd_external_libs_ctx { /** * Register custom controller function */ -void register_custom_controller_command(const gchar *name, +void register_custom_controller_command(const char *name, controller_func_t handler, gboolean privileged, gboolean require_message); |