Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 313dd35

Browse files
committed
Exclude raftable and arbiter port specification from connection string
1 parent 6f25496 commit 313dd35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/mmts/multimaster.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,7 +1846,7 @@ void MtmUpdateNodeConnectionInfo(MtmConnectionInfo* conn, char const* connStr)
18461846
port = strstr(connStr, "raftport=");
18471847
if (port != NULL) {
18481848
int n;
1849-
if (sscanf(port+9, "%d%d", &conn->raftablePort, &n) != 1) {
1849+
if (sscanf(port+9, "%d%n", &conn->raftablePort, &n) != 1) {
18501850
elog(ERROR, "Invalid raftable port: %s", port+9);
18511851
}
18521852
n += 9;
@@ -1859,7 +1859,7 @@ void MtmUpdateNodeConnectionInfo(MtmConnectionInfo* conn, char const* connStr)
18591859
port = strstr(connStr, "arbiterport=");
18601860
if (port != NULL) {
18611861
int n;
1862-
if (sscanf(port+12, "%d%d", &conn->arbiterPort, &n) != 1) {
1862+
if (sscanf(port+12, "%d%n", &conn->arbiterPort, &n) != 1) {
18631863
elog(ERROR, "Invalid arbiter port: %s", port+12);
18641864
}
18651865
n += 12;

0 commit comments

Comments
 (0)