aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-02 10:15:49 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-02 10:15:49 +0000
commit47a4e94b6f593a4098ff1a2231b6ee3be677e3cd (patch)
tree531fc6df649978a74f081d0f5c87e25e8650d39c /src
parentfa71f023a9e71d86760a807bcc3b7b3ffa075b64 (diff)
downloadrspamd-47a4e94b6f593a4098ff1a2231b6ee3be677e3cd.tar.gz
rspamd-47a4e94b6f593a4098ff1a2231b6ee3be677e3cd.zip
Fix bug with port setup.
Diffstat (limited to 'src')
-rw-r--r--src/libserver/url.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/src/libserver/url.c b/src/libserver/url.c
index a6423d0c0..c193377b0 100644
--- a/src/libserver/url.c
+++ b/src/libserver/url.c
@@ -33,26 +33,6 @@
#include "trie.h"
#include "http.h"
-#define POST_CHAR 1
-#define POST_CHAR_S "\001"
-
-/* Tcp port range */
-#define LOWEST_PORT 0
-#define HIGHEST_PORT 65535
-
-#define uri_port_is_valid(port) \
- (LOWEST_PORT <= (port) && (port) <= HIGHEST_PORT)
-
-struct _proto {
- guchar *name;
- gint port;
- uintptr_t *unused;
- guint need_slashes : 1;
- guint need_slash_after_host : 1;
- guint free_syntax : 1;
- guint need_ssl : 1;
-};
-
typedef struct url_match_s {
const gchar *m_begin;
gsize m_len;
@@ -1309,7 +1289,10 @@ set:
if (pt == 0 || pt > 65535) {
goto out;
}
- u->port = pt;
+ if (u != NULL) {
+ u->port = pt;
+ }
+
ret = 0;
break;
case parse_suffix_slash: