From: Marko Kreen Date: Thu, 14 Feb 2008 13:17:21 +0000 (+0000) Subject: fix getsockopt argument X-Git-Tag: pgbouncer_1_2_rc2~40 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f9811e6536f9e727f42f41c042199fe8ff362bca;p=pgbouncer fix getsockopt argument --- diff --git a/src/pooler.c b/src/pooler.c index 60f3d39..5d0cacb 100644 --- a/src/pooler.c +++ b/src/pooler.c @@ -126,7 +126,8 @@ static void tune_accept(int sock, bool on) int res = 0; #ifdef TCP_DEFER_ACCEPT int val = 45; /* fixme: proper value */ - res = getsockopt(sock, IPPROTO_TCP, TCP_DEFER_ACCEPT, &val, sizeof(val)); + socklen_t vlen = sizeof(val); + res = getsockopt(sock, IPPROTO_TCP, TCP_DEFER_ACCEPT, &val, &vlen); log_noise("old TCP_DEFER_ACCEPT on %d = %d", sock, val); val = on ? 1 : 0; log_noise("%s TCP_DEFER_ACCEPT on %d", act, sock);