From 37df23d183de23b74f8a026977b8210dc22701a6 Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Fri, 23 Jun 2023 21:03:29 +0000 Subject: rename client->addr to raddr (remote address) and keep original length --- ge.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'ge.c') diff --git a/ge.c b/ge.c index 0f4694d..f45d9b2 100644 --- a/ge.c +++ b/ge.c @@ -44,11 +44,9 @@ log_request(struct client *c, char *meta, size_t l) { char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV], b[GEMINI_URL_LEN]; const char *t; - size_t len; int ec; - len = sizeof(c->addr); - ec = getnameinfo((struct sockaddr*)&c->addr, len, + ec = getnameinfo((struct sockaddr*)&c->raddr, c->raddrlen, hbuf, sizeof(hbuf), sbuf, sizeof(sbuf), NI_NUMERICHOST | NI_NUMERICSERV); -- cgit v1.2.3