Skip to content

Commit

Permalink
[Rework] Further conversion routines
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Aug 15, 2023
1 parent 028a29f commit 6a6536a
Show file tree
Hide file tree
Showing 8 changed files with 161 additions and 232 deletions.
7 changes: 1 addition & 6 deletions src/libmime/scan_result.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ rspamd_create_metric_result(struct rspamd_task *task,
const gchar *name, gint lua_sym_cbref)
{
struct rspamd_scan_result *metric_res;
guint i;

metric_res = rspamd_mempool_alloc0(task->task_pool,
sizeof(struct rspamd_scan_result));
Expand Down Expand Up @@ -103,14 +102,10 @@ rspamd_create_metric_result(struct rspamd_task *task,
}

if (task->cfg) {
struct rspamd_action *act, *tmp;

int nact = rspamd_config_actions_size(task->cfg);
size_t nact = rspamd_config_actions_size(task->cfg);
metric_res->actions_config = rspamd_mempool_alloc0(task->task_pool,
sizeof(struct rspamd_action_config) * nact);

rspamd_config_actions_foreach_enumerate(task->cfg, rspamd_metric_actions_foreach_cb, metric_res);

metric_res->nactions = nact;
}

Expand Down
2 changes: 1 addition & 1 deletion src/libserver/cfg_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ struct rspamd_worker_conf {
guint64 rlimit_maxcore; /**< maximum core file size */
GHashTable *params; /**< params for worker */
GQueue *active_workers; /**< linked list of spawned workers */
gpointer *ctx; /**< worker's context */
gpointer ctx; /**< worker's context */
ucl_object_t *options; /**< other worker's options */
struct rspamd_worker_lua_script *scripts; /**< registered lua scripts */
gboolean enabled;
Expand Down

0 comments on commit 6a6536a

Please sign in to comment.