summaryrefslogtreecommitdiff
path: root/src/configfile-glue.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/configfile-glue.c')
-rw-r--r--src/configfile-glue.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/configfile-glue.c b/src/configfile-glue.c
index a2ac07ab..8a31e333 100644
--- a/src/configfile-glue.c
+++ b/src/configfile-glue.c
@@ -286,17 +286,13 @@ static cond_result_t config_check_cond_nocache(server *srv, connection *con, dat
ck_colon = strchr(dc->string->ptr, ':');
val_colon = strchr(l->ptr, ':');
- if (ck_colon == val_colon) {
- /* nothing to do with it */
- break;
- }
- if (ck_colon) {
+ if (NULL != ck_colon && NULL == val_colon) {
/* condition "host:port" but client send "host" */
buffer_copy_string_buffer(srv->cond_check_buf, l);
buffer_append_string_len(srv->cond_check_buf, CONST_STR_LEN(":"));
buffer_append_long(srv->cond_check_buf, sock_addr_get_port(&(srv_sock->addr)));
l = srv->cond_check_buf;
- } else if (!ck_colon) {
+ } else if (NULL != val_colon && NULL == ck_colon) {
/* condition "host" but client send "host:port" */
buffer_copy_string_len(srv->cond_check_buf, l->ptr, val_colon - l->ptr);
l = srv->cond_check_buf;