Skip to content

Commit fcc7ae0

Browse files
knizhnikkelvich
authored andcommitted
Exclude raftable and arbiter port specification from connection string
1 parent 58a399d commit fcc7ae0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

multimaster.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1855,7 +1855,7 @@ void MtmUpdateNodeConnectionInfo(MtmConnectionInfo* conn, char const* connStr)
18551855
port = strstr(connStr, "raftport=");
18561856
if (port != NULL) {
18571857
int n;
1858-
if (sscanf(port+9, "%d%d", &conn->raftablePort, &n) != 1) {
1858+
if (sscanf(port+9, "%d%n", &conn->raftablePort, &n) != 1) {
18591859
elog(ERROR, "Invalid raftable port: %s", port+9);
18601860
}
18611861
n += 9;
@@ -1868,7 +1868,7 @@ void MtmUpdateNodeConnectionInfo(MtmConnectionInfo* conn, char const* connStr)
18681868
port = strstr(connStr, "arbiterport=");
18691869
if (port != NULL) {
18701870
int n;
1871-
if (sscanf(port+12, "%d%d", &conn->arbiterPort, &n) != 1) {
1871+
if (sscanf(port+12, "%d%n", &conn->arbiterPort, &n) != 1) {
18721872
elog(ERROR, "Invalid arbiter port: %s", port+12);
18731873
}
18741874
n += 12;

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