summaryrefslogtreecommitdiffstats
path: root/src/util.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2012-01-16 20:59:37 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2012-01-16 20:59:37 +0400
commit9bacf0d835d66aaddcdb9e664a34364f25ed2554 (patch)
tree8aa7287724a3abce1b6b63dc7215e101d44eb87d /src/util.h
parent9f2cb66ccbce8cd0fb659b79063bcebf1d816a1d (diff)
downloadrspamd-9bacf0d835d66aaddcdb9e664a34364f25ed2554.tar.gz
rspamd-9bacf0d835d66aaddcdb9e664a34364f25ed2554.zip
* Introduce new system of worker's and modules initialization:
- Removed legacy limitation of worker's types; - Using GQuarks to identify workers and modules; - Remove modules.sh script; - Add a common system of workers and modules; - Write management and configuration for new architecture.
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h37
1 files changed, 7 insertions, 30 deletions
diff --git a/src/util.h b/src/util.h
index c4fcc80f4..e520c9d2d 100644
--- a/src/util.h
+++ b/src/util.h
@@ -14,21 +14,6 @@ struct workq;
struct statfile;
struct classifier_config;
-/**
- * Process type: main or worker
- */
-enum process_type {
- TYPE_UNKNOWN=-1,
- TYPE_MAIN,
- TYPE_WORKER,
- TYPE_CONTROLLER,
- TYPE_LMTP,
- TYPE_SMTP,
- TYPE_FUZZY,
- TYPE_KVSTORAGE,
- TYPE_MAX=255
-};
-
/*
* Create socket and bind or connect it to specified address and port
*/
@@ -195,21 +180,6 @@ void g_queue_clear (GQueue *queue);
gsize rspamd_strlcpy (gchar *dst, const gchar *src, gsize siz);
/*
- * Convert process type to its name
- *
- * @param type numeric type
- * @return string representation of type
- */
-const gchar * process_to_str (enum process_type type);
-/*
- * Convert string to process type
- *
- * @param type numeric type
- * @return string representation of type
- */
-enum process_type str_to_process (const gchar *str);
-
-/*
* Strip <> from email address
*/
gchar * escape_braces_addr_fstr (memory_pool_t *pool, f_str_t *in);
@@ -250,4 +220,11 @@ gboolean rspamd_strtoul (const gchar *s, gsize len, gulong *value);
*/
gint rspamd_fallocate (gint fd, off_t offset, off_t len);
+/**
+ * Return worker's control structure by its type
+ * @param type
+ * @return worker's control structure or NULL
+ */
+worker_t* get_worker_by_type (GQuark type);
+
#endif