aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/addr.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-07-26 18:15:23 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-07-26 18:15:23 +0100
commit437cef075caec19a8150e0c4c04ef64a1a5e9d94 (patch)
tree552428ca46dc5e20f436be29981f282d8c1e83e0 /src/libutil/addr.h
parent44f911a00655f5c8caa103f15afa155c25ac25a0 (diff)
downloadrspamd-437cef075caec19a8150e0c4c04ef64a1a5e9d94.tar.gz
rspamd-437cef075caec19a8150e0c4c04ef64a1a5e9d94.zip
[Minor] Rework rspamd_parse_host_port_priority function result
Diffstat (limited to 'src/libutil/addr.h')
-rw-r--r--src/libutil/addr.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/libutil/addr.h b/src/libutil/addr.h
index fe00ccc86..06413a51a 100644
--- a/src/libutil/addr.h
+++ b/src/libutil/addr.h
@@ -240,17 +240,23 @@ gint rspamd_accept_from_socket (gint sock,
rspamd_accept_throttling_handler hdl,
void *hdl_data);
+enum rspamd_parse_host_port_result {
+ RSPAMD_PARSE_ADDR_FAIL = 0,
+ RSPAMD_PARSE_ADDR_RESOLVED = 1,
+ RSPAMD_PARSE_ADDR_NUMERIC = 2,
+};
/**
* Parse host[:port[:priority]] line
* @param ina host address
* @param port port
* @param priority priority
- * @return TRUE if string was parsed
+ * @return RSPAMD_PARSE_ADDR_FAIL in case of error, RSPAMD_PARSE_ADDR_NUMERIC in case of pure ip/unix socket
*/
-gboolean rspamd_parse_host_port_priority (const gchar *str,
- GPtrArray **addrs,
- guint *priority, gchar **name, guint default_port,
- rspamd_mempool_t *pool);
+enum rspamd_parse_host_port_result
+rspamd_parse_host_port_priority (const gchar *str,
+ GPtrArray **addrs,
+ guint *priority, gchar **name, guint default_port,
+ rspamd_mempool_t *pool);
/**
* Destroy the specified IP address