Incorrect translator comment for ListenServerPort()?

Поиск
Список
Период
Сортировка
Искать

Incorrect translator comment for ListenServerPort()?

От:
Japin Li <japinli@hotmail.com>
Дата:

Hi, all

When I read the ListenServerPort(), I noticed two incorrect translator
implementations: 1) the translator for setsockopt(SO_REUSEADDR), which
should not be "Unix"; 2) the translator for setsockopt(IPV6_V6ONLY),
which is applicable only to IPv6.

diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c
index 1bf27d93cfa..9f58e4c4e39 100644
--- a/src/backend/libpq/pqcomm.c
+++ b/src/backend/libpq/pqcomm.c
@@ -571,7 +571,7 @@ ListenServerPort(int family, const char *hostName, unsigned short portNumber,
 			{
 				ereport(LOG,
 						(errcode_for_socket_access(),
-				/* translator: third %s is IPv4, IPv6, or Unix */
+				/* translator: third %s is IPv4 or IPv6 */
 						 errmsg("%s(%s) failed for %s address \"%s\": %m",
 								"setsockopt", "SO_REUSEADDR",
 								familyDesc, addrDesc)));
@@ -589,7 +589,7 @@ ListenServerPort(int family, const char *hostName, unsigned short portNumber,
 			{
 				ereport(LOG,
 						(errcode_for_socket_access(),
-				/* translator: third %s is IPv4, IPv6, or Unix */
+				/* translator: third %s is IPv6 */
 						 errmsg("%s(%s) failed for %s address \"%s\": %m",
 								"setsockopt", "IPV6_V6ONLY",
 								familyDesc, addrDesc)));

-- 
Regrads,
Japin Li


Re: Incorrect translator comment for ListenServerPort()?

От:
Daniel Gustafsson <daniel@yesql.se>
Дата:
> On 17 Feb 2025, at 15:39, Japin Li  wrote:

> When I read the ListenServerPort(), I noticed two incorrect translator
> implementations: 1) the translator for setsockopt(SO_REUSEADDR), which
> should not be "Unix"; 2) the translator for setsockopt(IPV6_V6ONLY),
> which is applicable only to IPv6.

Nice catches, I agree with your conclusions. I'll apply these in a bit.

--
Daniel Gustafsson



Re: Incorrect translator comment for ListenServerPort()?

От:
Japin Li <japinli@hotmail.com>
Дата:
On Mon, 17 Feb 2025 at 15:45, Daniel Gustafsson  wrote:
>> On 17 Feb 2025, at 15:39, Japin Li  wrote:
>
>> When I read the ListenServerPort(), I noticed two incorrect translator
>> implementations: 1) the translator for setsockopt(SO_REUSEADDR), which
>> should not be "Unix"; 2) the translator for setsockopt(IPV6_V6ONLY),
>> which is applicable only to IPv6.
>
> Nice catches, I agree with your conclusions. I'll apply these in a bit.
>

Thanks for your quick review.

-- 
Regrads,
Japin Li


FAQ