aboutsummaryrefslogtreecommitdiff
path: root/ge.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2023-06-23 21:03:29 +0000
committerOmar Polo <op@omarpolo.com>2023-06-23 21:03:29 +0000
commit37df23d183de23b74f8a026977b8210dc22701a6 (patch)
tree69b71962dd24b8d188ce6a7a4aed47f6c0b4aa98 /ge.c
parentab55c7815e8e749e775d95c26f0e217744949285 (diff)
rename client->addr to raddr (remote address) and keep original length
Diffstat (limited to 'ge.c')
-rw-r--r--ge.c4
1 files changed, 1 insertions, 3 deletions
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);