}
srv_cmd.type = RSPAMD_SRV_HYPERSCAN_LOADED;
- srv_cmd.cmd.hs_loaded.cache_dir = ctx->hs_dir;
+ rspamd_strlcpy (srv_cmd.cmd.hs_loaded.cache_dir, ctx->hs_dir,
+ sizeof (srv_cmd.cmd.hs_loaded.cache_dir));
srv_cmd.cmd.hs_loaded.forced = forced;
rspamd_srv_send_command (worker, ctx->ev_base, &srv_cmd, -1, NULL, NULL);
* We assume that cache dir is shared at the same address for all
* workers
*/
- wcmd.cmd.hs_loaded.cache_dir = cmd.cmd.hs_loaded.cache_dir;
+ rspamd_strlcpy (wcmd.cmd.hs_loaded.cache_dir,
+ cmd.cmd.hs_loaded.cache_dir,
+ sizeof (wcmd.cmd.hs_loaded.cache_dir));
wcmd.cmd.hs_loaded.forced = cmd.cmd.hs_loaded.forced;
rspamd_control_broadcast_cmd (srv, &wcmd, rfd,
rspamd_control_hs_io_handler, NULL);
enum rspamd_log_pipe_type {
RSPAMD_LOG_PIPE_SYMBOLS = 0,
};
-
+#define CONTROL_PATHLEN 400
struct rspamd_control_command {
enum rspamd_control_type type;
union {
guint unused;
} recompile;
struct {
- gpointer cache_dir;
+ gchar cache_dir[CONTROL_PATHLEN];
gboolean forced;
} hs_loaded;
struct {
};
#define PAIR_ID_LEN 16
+
struct rspamd_srv_command {
enum rspamd_srv_type type;
guint64 id;
guint pair_num;
} spair;
struct {
- gpointer cache_dir;
+ gchar cache_dir[CONTROL_PATHLEN];
gboolean forced;
} hs_loaded;
struct {