Skip to content

Commit 6568290

Browse files
committed
fix: endpoint port handling in network_compute_endpoints function
1 parent c2e11cd commit 6568290

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/network.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,8 +626,7 @@ bool network_compute_endpoints (sqlite3_context *context, network_data *data, co
626626
query = strdup(p);
627627
}
628628
if (!scheme || !host || !database) goto finalize;
629-
if (!port) port = strdup(CLOUDSYNC_DEFAULT_ENDPOINT_PORT);
630-
#define port_or_default port
629+
char *port_or_default = port && strcmp(port, "8860") != 0 ? port : CLOUDSYNC_DEFAULT_ENDPOINT_PORT;
631630
#endif
632631
if (query != NULL) {
633632
char value[MAX_QUERY_VALUE_LEN];

0 commit comments

Comments
 (0)