From: Marko Kreen Date: Wed, 29 Sep 2010 16:37:36 +0000 (-0700) Subject: connect_server: store port in host order X-Git-Tag: pgbouncer_1_4_rc3~32 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4927c20a4b3673ec36a95f002ca5fc87d84a7196;p=pgbouncer connect_server: store port in host order --- diff --git a/src/objects.c b/src/objects.c index faddcec..c0caa47 100644 --- a/src/objects.c +++ b/src/objects.c @@ -822,7 +822,7 @@ static void connect_server(struct PgSocket *server, struct sockaddr *sa, int sal server->remote_addr.is_unix = true; } else if (sa->sa_family == AF_INET) { struct sockaddr_in *in = (struct sockaddr_in *)sa; - server->remote_addr.port = in->sin_port; + server->remote_addr.port = ntohs(in->sin_port); server->remote_addr.ip_addr = in->sin_addr; }