diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-07-23 12:53:08 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-07-23 12:53:08 +0100 |
commit | fe79d8c5a39f2b717f78cc3f3ef21b3cfc46500b (patch) | |
tree | c84e6a5d4c5cd78a7a2cc3c7adbc7af5d0541682 /src/libserver/url.h | |
parent | e0483657ff6cf1adc828ccce457814d61fe90a0d (diff) | |
download | rspamd-fe79d8c5a39f2b717f78cc3f3ef21b3cfc46500b.tar.gz rspamd-fe79d8c5a39f2b717f78cc3f3ef21b3cfc46500b.zip |
Revert "Unify code style."
This reverts commit e0483657ff6cf1adc828ccce457814d61fe90a0d.
Diffstat (limited to 'src/libserver/url.h')
-rw-r--r-- | src/libserver/url.h | 47 |
1 files changed, 18 insertions, 29 deletions
diff --git a/src/libserver/url.h b/src/libserver/url.h index d8877f279..60535ba5c 100644 --- a/src/libserver/url.h +++ b/src/libserver/url.h @@ -43,24 +43,24 @@ struct uri { guint fragmentlen; /* Flags */ - gboolean ipv6; /* URI contains IPv6 host */ - gboolean form; /* URI originated from form */ + gboolean ipv6; /* URI contains IPv6 host */ + gboolean form; /* URI originated from form */ gboolean is_phished; /* URI maybe phishing */ }; enum uri_errno { - URI_ERRNO_OK, /* Parsing went well */ - URI_ERRNO_EMPTY, /* The URI string was empty */ - URI_ERRNO_INVALID_PROTOCOL, /* No protocol was found */ - URI_ERRNO_NO_SLASHES, /* Slashes after protocol missing */ - URI_ERRNO_TOO_MANY_SLASHES, /* Too many slashes after protocol */ - URI_ERRNO_TRAILING_DOTS, /* '.' after host */ - URI_ERRNO_NO_HOST, /* Host part is missing */ - URI_ERRNO_NO_PORT_COLON, /* ':' after host without port */ - URI_ERRNO_NO_HOST_SLASH, /* Slash after host missing */ - URI_ERRNO_IPV6_SECURITY, /* IPv6 security bug detected */ - URI_ERRNO_INVALID_PORT, /* Port number is bad */ - URI_ERRNO_INVALID_PORT_RANGE /* Port number is not within 0-65535 */ + URI_ERRNO_OK, /* Parsing went well */ + URI_ERRNO_EMPTY, /* The URI string was empty */ + URI_ERRNO_INVALID_PROTOCOL, /* No protocol was found */ + URI_ERRNO_NO_SLASHES, /* Slashes after protocol missing */ + URI_ERRNO_TOO_MANY_SLASHES, /* Too many slashes after protocol */ + URI_ERRNO_TRAILING_DOTS, /* '.' after host */ + URI_ERRNO_NO_HOST, /* Host part is missing */ + URI_ERRNO_NO_PORT_COLON, /* ':' after host without port */ + URI_ERRNO_NO_HOST_SLASH, /* Slash after host missing */ + URI_ERRNO_IPV6_SECURITY, /* IPv6 security bug detected */ + URI_ERRNO_INVALID_PORT, /* Port number is bad */ + URI_ERRNO_INVALID_PORT_RANGE /* Port number is not within 0-65535 */ }; enum protocol { @@ -81,10 +81,7 @@ enum protocol { * @param part current text part * @param is_html turn on html euristic */ -void url_parse_text (rspamd_mempool_t *pool, - struct rspamd_task *task, - struct mime_text_part *part, - gboolean is_html); +void url_parse_text (rspamd_mempool_t *pool, struct rspamd_task *task, struct mime_text_part *part, gboolean is_html); /* * Parse a single url into an uri structure @@ -92,9 +89,7 @@ void url_parse_text (rspamd_mempool_t *pool, * @param uristring text form of url * @param uri url object, must be pre allocated */ -enum uri_errno parse_uri (struct uri *uri, - gchar *uristring, - rspamd_mempool_t *pool); +enum uri_errno parse_uri(struct uri *uri, gchar *uristring, rspamd_mempool_t *pool); /* * Try to extract url from a text @@ -106,17 +101,11 @@ enum uri_errno parse_uri (struct uri *uri, * @param url_str storage for url string(or NULL) * @return TRUE if url is found in specified text */ -gboolean url_try_text (rspamd_mempool_t *pool, - const gchar *begin, - gsize len, - gchar **start, - gchar **end, - gchar **url_str, - gboolean is_html); +gboolean url_try_text (rspamd_mempool_t *pool, const gchar *begin, gsize len, gchar **start, gchar **end, gchar **url_str, gboolean is_html); /* * Return text representation of url parsing error */ -const gchar * url_strerror (enum uri_errno err); +const gchar* url_strerror (enum uri_errno err); #endif |