From a4f539e726e0796bf4e106e12afc2161e1059dfc Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Mon, 22 Dec 2014 20:32:58 +0000 Subject: [PATCH] yaid.c (client_line): Set remote address earlier. Organization: Straylight/Edgeware From: Mark Wooding We need it for the log message if we can't parse the request. --- yaid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yaid.c b/yaid.c index a9793a0..2548caf 100644 --- a/yaid.c +++ b/yaid.c @@ -633,6 +633,7 @@ static void client_line(char *line, size_t len, void *p) int i, t; /* If the connection has closed, then tidy stuff away. */ + c->q.s[R].addr = c->raddr; c->q.s[L].port = c->q.s[R].port = 0; if (!line) { disconnect_client(c); @@ -658,7 +659,6 @@ static void client_line(char *line, size_t len, void *p) skipws(&q); if (*q) goto bad; /* Identify the connection. Act on the result. */ - c->q.s[R].addr = c->raddr; identify(&c->q); switch (c->q.resp) { -- [mdw]