Skip to content

Commit c804147

Browse files
committed
Add missing gettext calls for some SSL errors.
1 parent 70bc947 commit c804147

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/backend/libpq/be-secure.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/backend/libpq/be-secure.c,v 1.71 2006/07/14 14:52:19 momjian Exp $
14+
* $PostgreSQL: pgsql/src/backend/libpq/be-secure.c,v 1.72 2006/09/04 14:57:27 petere Exp $
1515
*
1616
* Since the server static private key ($DataDir/server.key)
1717
* will normally be stored unencrypted so that the database
@@ -986,11 +986,11 @@ SSLerrmessage(void)
986986

987987
errcode = ERR_get_error();
988988
if (errcode == 0)
989-
return "No SSL error reported";
989+
return _("no SSL error reported");
990990
errreason = ERR_reason_error_string(errcode);
991991
if (errreason != NULL)
992992
return errreason;
993-
snprintf(errbuf, sizeof(errbuf), "SSL error code %lu", errcode);
993+
snprintf(errbuf, sizeof(errbuf), _("SSL error code %lu"), errcode);
994994
return errbuf;
995995
}
996996

src/interfaces/libpq/fe-secure.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.85 2006/07/14 16:59:19 tgl Exp $
14+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.86 2006/09/04 14:57:27 petere Exp $
1515
*
1616
* NOTES
1717
* [ Most of these notes are wrong/obsolete, but perhaps not all ]
@@ -1000,7 +1000,7 @@ close_SSL(PGconn *conn)
10001000
* return NULL if it doesn't recognize the error code. We don't
10011001
* want to return NULL ever.
10021002
*/
1003-
static char ssl_nomem[] = "Out of memory allocating error description";
1003+
static char ssl_nomem[] = "out of memory allocating error description";
10041004

10051005
#define SSL_ERR_LEN 128
10061006

@@ -1017,7 +1017,7 @@ SSLerrmessage(void)
10171017
errcode = ERR_get_error();
10181018
if (errcode == 0)
10191019
{
1020-
strcpy(errbuf, "No SSL error reported");
1020+
snprintf(errbuf, SSL_ERR_LEN, libpq_gettext("no SSL error reported"));
10211021
return errbuf;
10221022
}
10231023
errreason = ERR_reason_error_string(errcode);
@@ -1027,7 +1027,7 @@ SSLerrmessage(void)
10271027
errbuf[SSL_ERR_LEN - 1] = '\0';
10281028
return errbuf;
10291029
}
1030-
snprintf(errbuf, SSL_ERR_LEN, "SSL error code %lu", errcode);
1030+
snprintf(errbuf, SSL_ERR_LEN, libpq_gettext("SSL error code %lu"), errcode);
10311031
return errbuf;
10321032
}
10331033

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy