Fossil SCM

Always try to extract the IP address and PORT number from the --port option to "fossil server" if the option contains a ':' character.

drh 2018-01-05 15:25 trunk
Commit 4d3cb0da65f7d12b818517c9cb1c53d6524f5168ef42df53189fdaa12e610711
1 file changed +1 -1
+1 -1
--- src/main.c
+++ src/main.c
@@ -2494,11 +2494,11 @@
24942494
}else{
24952495
zInitPage = "";
24962496
}
24972497
}
24982498
if( zPort ){
2499
- if( strchr(zPort,'.') || zPort[0]=='[' ){
2499
+ if( strchr(zPort,':') ){
25002500
int i;
25012501
for(i=strlen(zPort)-1; i>=0 && zPort[i]!=':'; i--){}
25022502
if( i>0 ){
25032503
if( zPort[0]=='[' && zPort[i-1]==']' ){
25042504
zIpAddr = mprintf("%.*s", i-2, zPort+1);
25052505
--- src/main.c
+++ src/main.c
@@ -2494,11 +2494,11 @@
2494 }else{
2495 zInitPage = "";
2496 }
2497 }
2498 if( zPort ){
2499 if( strchr(zPort,'.') || zPort[0]=='[' ){
2500 int i;
2501 for(i=strlen(zPort)-1; i>=0 && zPort[i]!=':'; i--){}
2502 if( i>0 ){
2503 if( zPort[0]=='[' && zPort[i-1]==']' ){
2504 zIpAddr = mprintf("%.*s", i-2, zPort+1);
2505
--- src/main.c
+++ src/main.c
@@ -2494,11 +2494,11 @@
2494 }else{
2495 zInitPage = "";
2496 }
2497 }
2498 if( zPort ){
2499 if( strchr(zPort,':') ){
2500 int i;
2501 for(i=strlen(zPort)-1; i>=0 && zPort[i]!=':'; i--){}
2502 if( i>0 ){
2503 if( zPort[0]=='[' && zPort[i-1]==']' ){
2504 zIpAddr = mprintf("%.*s", i-2, zPort+1);
2505

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button