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.
Commit
4d3cb0da65f7d12b818517c9cb1c53d6524f5168ef42df53189fdaa12e610711
Parent
e506ebb764e9371…
1 file changed
+1
-1
+1
-1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -2494,11 +2494,11 @@ | ||
| 2494 | 2494 | }else{ |
| 2495 | 2495 | zInitPage = ""; |
| 2496 | 2496 | } |
| 2497 | 2497 | } |
| 2498 | 2498 | if( zPort ){ |
| 2499 | - if( strchr(zPort,'.') || zPort[0]=='[' ){ | |
| 2499 | + if( strchr(zPort,':') ){ | |
| 2500 | 2500 | int i; |
| 2501 | 2501 | for(i=strlen(zPort)-1; i>=0 && zPort[i]!=':'; i--){} |
| 2502 | 2502 | if( i>0 ){ |
| 2503 | 2503 | if( zPort[0]=='[' && zPort[i-1]==']' ){ |
| 2504 | 2504 | zIpAddr = mprintf("%.*s", i-2, zPort+1); |
| 2505 | 2505 |
| --- 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 |