summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-07-01 15:59:39 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-07-01 15:59:39 +0100
commit4f5967972210be316822b8f74e39c80dbd88e12f (patch)
tree4f357d441b4471353c158b67d2a15e7f90ad6864
parentfc8a07daabc8d624d21a20437974a1a13a2a097e (diff)
downloadrspamd-4f5967972210be316822b8f74e39c80dbd88e12f.tar.gz
rspamd-4f5967972210be316822b8f74e39c80dbd88e12f.zip
Add port definition to URL.
-rw-r--r--src/libserver/url.c2
-rw-r--r--src/libserver/url.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/libserver/url.c b/src/libserver/url.c
index 7efc7cd26..0373f23ec 100644
--- a/src/libserver/url.c
+++ b/src/libserver/url.c
@@ -1092,6 +1092,8 @@ rspamd_url_parse (struct rspamd_url *uri, gchar *uristring, gsize len,
}
}
+ uri->port = u.port;
+
if (!uri->hostlen) {
return URI_ERRNO_BAD_FORMAT;
}
diff --git a/src/libserver/url.h b/src/libserver/url.h
index ce8154211..1faead3f2 100644
--- a/src/libserver/url.h
+++ b/src/libserver/url.h
@@ -11,11 +11,11 @@ struct mime_text_part;
struct rspamd_url {
gchar *string;
gint protocol;
+ guint port;
gchar *user;
gchar *password;
gchar *host;
- gchar *port;
gchar *data;
gchar *query;
gchar *fragment;