summaryrefslogtreecommitdiffstats
path: root/src/libserver/rspamd_control.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libserver/rspamd_control.h')
-rw-r--r--src/libserver/rspamd_control.h94
1 files changed, 47 insertions, 47 deletions
diff --git a/src/libserver/rspamd_control.h b/src/libserver/rspamd_control.h
index c9f608fe1..a08ba7948 100644
--- a/src/libserver/rspamd_control.h
+++ b/src/libserver/rspamd_control.h
@@ -60,23 +60,23 @@ struct rspamd_control_command {
enum rspamd_control_type type;
union {
struct {
- guint unused;
+ unsigned int unused;
} stat;
struct {
- guint unused;
+ unsigned int unused;
} reload;
struct {
- guint unused;
+ unsigned int unused;
} reresolve;
struct {
- guint unused;
+ unsigned int unused;
} recompile;
struct {
gboolean forced;
- gchar cache_dir[CONTROL_PATHLEN];
+ char cache_dir[CONTROL_PATHLEN];
} hs_loaded;
struct {
- gchar tag[32];
+ char tag[32];
gboolean alive;
pid_t sender;
} monitored_change;
@@ -84,10 +84,10 @@ struct rspamd_control_command {
enum rspamd_log_pipe_type type;
} log_pipe;
struct {
- guint unused;
+ unsigned int unused;
} fuzzy_stat;
struct {
- guint unused;
+ unsigned int unused;
} fuzzy_sync;
struct {
enum {
@@ -96,7 +96,7 @@ struct rspamd_control_command {
rspamd_child_terminated,
} what;
pid_t pid;
- guint additional;
+ unsigned int additional;
} child_change;
struct {
union {
@@ -113,39 +113,39 @@ struct rspamd_control_reply {
enum rspamd_control_type type;
union {
struct {
- guint conns;
- gdouble uptime;
- gdouble utime;
- gdouble systime;
+ unsigned int conns;
+ double uptime;
+ double utime;
+ double systime;
gulong maxrss;
} stat;
struct {
- guint status;
+ unsigned int status;
} reload;
struct {
- guint status;
+ unsigned int status;
} reresolve;
struct {
- guint status;
+ unsigned int status;
} recompile;
struct {
- guint status;
+ unsigned int status;
} hs_loaded;
struct {
- guint status;
+ unsigned int status;
} monitored_change;
struct {
- guint status;
+ unsigned int status;
} log_pipe;
struct {
- guint status;
- gchar storage_id[MEMPOOL_UID_LEN];
+ unsigned int status;
+ char storage_id[MEMPOOL_UID_LEN];
} fuzzy_stat;
struct {
- guint status;
+ unsigned int status;
} fuzzy_sync;
struct {
- guint status;
+ unsigned int status;
} fuzzy_blocked;
} reply;
};
@@ -157,16 +157,16 @@ struct rspamd_srv_command {
uint64_t id;
union {
struct {
- gint af;
- gchar pair_id[PAIR_ID_LEN];
- guint pair_num;
+ int af;
+ char pair_id[PAIR_ID_LEN];
+ unsigned int pair_num;
} spair;
struct {
gboolean forced;
- gchar cache_dir[CONTROL_PATHLEN];
+ char cache_dir[CONTROL_PATHLEN];
} hs_loaded;
struct {
- gchar tag[32];
+ char tag[32];
gboolean alive;
pid_t sender;
} monitored_change;
@@ -182,11 +182,11 @@ struct rspamd_srv_command {
} state;
} on_fork;
struct {
- guint status;
+ unsigned int status;
/* TODO: add more fields */
} heartbeat;
struct {
- guint status;
+ unsigned int status;
} health;
/* Used when a worker loads a valid hyperscan file */
struct {
@@ -209,28 +209,28 @@ struct rspamd_srv_reply {
uint64_t id;
union {
struct {
- gint code;
+ int code;
} spair;
struct {
- gint forced;
+ int forced;
} hs_loaded;
struct {
- gint status;
+ int status;
};
struct {
enum rspamd_log_pipe_type type;
} log_pipe;
struct {
- gint status;
+ int status;
} on_fork;
struct {
- gint status;
+ int status;
} heartbeat;
struct {
- guint status;
- guint workers_count;
- guint scanners_count;
- guint workers_hb_lost;
+ unsigned int status;
+ unsigned int workers_count;
+ unsigned int scanners_count;
+ unsigned int workers_hb_lost;
} health;
struct {
int unused;
@@ -243,20 +243,20 @@ struct rspamd_srv_reply {
typedef gboolean (*rspamd_worker_control_handler)(struct rspamd_main *rspamd_main,
struct rspamd_worker *worker,
- gint fd,
- gint attached_fd,
+ int fd,
+ int attached_fd,
struct rspamd_control_command *cmd,
gpointer ud);
typedef void (*rspamd_srv_reply_handler)(struct rspamd_worker *worker,
- struct rspamd_srv_reply *rep, gint rep_fd,
+ struct rspamd_srv_reply *rep, int rep_fd,
gpointer ud);
/**
* Process client socket connection
*/
void rspamd_control_process_client_socket(struct rspamd_main *rspamd_main,
- gint fd, rspamd_inet_addr_t *addr);
+ int fd, rspamd_inet_addr_t *addr);
/**
* Register default handlers for a worker
@@ -287,7 +287,7 @@ void rspamd_srv_start_watching(struct rspamd_main *srv,
void rspamd_srv_send_command(struct rspamd_worker *worker,
struct ev_loop *ev_base,
struct rspamd_srv_command *cmd,
- gint attached_fd,
+ int attached_fd,
rspamd_srv_reply_handler handler,
gpointer ud);
@@ -306,16 +306,16 @@ void rspamd_control_broadcast_srv_cmd(struct rspamd_main *rspamd_main,
* @param str
* @return
*/
-enum rspamd_control_type rspamd_control_command_from_string(const gchar *str);
+enum rspamd_control_type rspamd_control_command_from_string(const char *str);
/**
* Returns command name from it's type
* @param cmd
* @return
*/
-const gchar *rspamd_control_command_to_string(enum rspamd_control_type cmd);
+const char *rspamd_control_command_to_string(enum rspamd_control_type cmd);
-const gchar *rspamd_srv_command_to_string(enum rspamd_srv_type cmd);
+const char *rspamd_srv_command_to_string(enum rspamd_srv_type cmd);
/**
* Used to cleanup pending events