Fossil SCM
Add the http-port setting used to specify the default TCP/IP port for the built-in webserver. Ticket [7168128e09].
Commit
02f09cdd6c1bbea61002c82628bdf05629211207
Parent
bcb9c072c56f443…
2 files changed
+4
+5
-5
M
src/db.c
+4
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -1288,10 +1288,13 @@ | ||
| 1288 | 1288 | ** |
| 1289 | 1289 | ** diff-command External command to run when performing a diff. |
| 1290 | 1290 | ** If undefined, the internal text diff will be used. |
| 1291 | 1291 | ** |
| 1292 | 1292 | ** editor Text editor command used for check-in comments. |
| 1293 | +** | |
| 1294 | +** http-port The TCP/IP port number to use by the "server" | |
| 1295 | +** and "ui" commands. Default: 8080 | |
| 1293 | 1296 | ** |
| 1294 | 1297 | ** gdiff-command External command to run when performing a graphical |
| 1295 | 1298 | ** diff. If undefined, text diff will be used. |
| 1296 | 1299 | ** |
| 1297 | 1300 | ** localauth If enabled, require that HTTP connections from |
| @@ -1320,10 +1323,11 @@ | ||
| 1320 | 1323 | static const char *azName[] = { |
| 1321 | 1324 | "autosync", |
| 1322 | 1325 | "diff-command", |
| 1323 | 1326 | "editor", |
| 1324 | 1327 | "gdiff-command", |
| 1328 | + "http-port", | |
| 1325 | 1329 | "localauth", |
| 1326 | 1330 | "clearsign", |
| 1327 | 1331 | "pgp-command", |
| 1328 | 1332 | "proxy", |
| 1329 | 1333 | "web-browser", |
| 1330 | 1334 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -1288,10 +1288,13 @@ | |
| 1288 | ** |
| 1289 | ** diff-command External command to run when performing a diff. |
| 1290 | ** If undefined, the internal text diff will be used. |
| 1291 | ** |
| 1292 | ** editor Text editor command used for check-in comments. |
| 1293 | ** |
| 1294 | ** gdiff-command External command to run when performing a graphical |
| 1295 | ** diff. If undefined, text diff will be used. |
| 1296 | ** |
| 1297 | ** localauth If enabled, require that HTTP connections from |
| @@ -1320,10 +1323,11 @@ | |
| 1320 | static const char *azName[] = { |
| 1321 | "autosync", |
| 1322 | "diff-command", |
| 1323 | "editor", |
| 1324 | "gdiff-command", |
| 1325 | "localauth", |
| 1326 | "clearsign", |
| 1327 | "pgp-command", |
| 1328 | "proxy", |
| 1329 | "web-browser", |
| 1330 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -1288,10 +1288,13 @@ | |
| 1288 | ** |
| 1289 | ** diff-command External command to run when performing a diff. |
| 1290 | ** If undefined, the internal text diff will be used. |
| 1291 | ** |
| 1292 | ** editor Text editor command used for check-in comments. |
| 1293 | ** |
| 1294 | ** http-port The TCP/IP port number to use by the "server" |
| 1295 | ** and "ui" commands. Default: 8080 |
| 1296 | ** |
| 1297 | ** gdiff-command External command to run when performing a graphical |
| 1298 | ** diff. If undefined, text diff will be used. |
| 1299 | ** |
| 1300 | ** localauth If enabled, require that HTTP connections from |
| @@ -1320,10 +1323,11 @@ | |
| 1323 | static const char *azName[] = { |
| 1324 | "autosync", |
| 1325 | "diff-command", |
| 1326 | "editor", |
| 1327 | "gdiff-command", |
| 1328 | "http-port", |
| 1329 | "localauth", |
| 1330 | "clearsign", |
| 1331 | "pgp-command", |
| 1332 | "proxy", |
| 1333 | "web-browser", |
| 1334 |
+5
-5
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -714,21 +714,21 @@ | ||
| 714 | 714 | g.thTrace = find_option("th-trace", 0, 0)!=0; |
| 715 | 715 | if( g.thTrace ){ |
| 716 | 716 | blob_zero(&g.thLog); |
| 717 | 717 | } |
| 718 | 718 | zPort = find_option("port", "P", 1); |
| 719 | - if( zPort ){ | |
| 720 | - iPort = atoi(zPort); | |
| 721 | - }else{ | |
| 722 | - iPort = 8080; | |
| 723 | - } | |
| 724 | 719 | if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?"); |
| 725 | 720 | if( g.argc==2 ){ |
| 726 | 721 | db_must_be_within_tree(); |
| 727 | 722 | }else{ |
| 728 | 723 | db_open_repository(g.argv[2]); |
| 729 | 724 | } |
| 725 | + if( zPort ){ | |
| 726 | + iPort = atoi(zPort); | |
| 727 | + }else{ | |
| 728 | + iPort = db_get_int("http-port", 8080); | |
| 729 | + } | |
| 730 | 730 | #ifndef __MINGW32__ |
| 731 | 731 | /* Unix implementation */ |
| 732 | 732 | if( g.argv[1][0]=='u' ){ |
| 733 | 733 | #if !defined(__DARWIN__) && !defined(__APPLE__) |
| 734 | 734 | zBrowser = db_get("web-browser", "firefox"); |
| 735 | 735 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -714,21 +714,21 @@ | |
| 714 | g.thTrace = find_option("th-trace", 0, 0)!=0; |
| 715 | if( g.thTrace ){ |
| 716 | blob_zero(&g.thLog); |
| 717 | } |
| 718 | zPort = find_option("port", "P", 1); |
| 719 | if( zPort ){ |
| 720 | iPort = atoi(zPort); |
| 721 | }else{ |
| 722 | iPort = 8080; |
| 723 | } |
| 724 | if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?"); |
| 725 | if( g.argc==2 ){ |
| 726 | db_must_be_within_tree(); |
| 727 | }else{ |
| 728 | db_open_repository(g.argv[2]); |
| 729 | } |
| 730 | #ifndef __MINGW32__ |
| 731 | /* Unix implementation */ |
| 732 | if( g.argv[1][0]=='u' ){ |
| 733 | #if !defined(__DARWIN__) && !defined(__APPLE__) |
| 734 | zBrowser = db_get("web-browser", "firefox"); |
| 735 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -714,21 +714,21 @@ | |
| 714 | g.thTrace = find_option("th-trace", 0, 0)!=0; |
| 715 | if( g.thTrace ){ |
| 716 | blob_zero(&g.thLog); |
| 717 | } |
| 718 | zPort = find_option("port", "P", 1); |
| 719 | if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?"); |
| 720 | if( g.argc==2 ){ |
| 721 | db_must_be_within_tree(); |
| 722 | }else{ |
| 723 | db_open_repository(g.argv[2]); |
| 724 | } |
| 725 | if( zPort ){ |
| 726 | iPort = atoi(zPort); |
| 727 | }else{ |
| 728 | iPort = db_get_int("http-port", 8080); |
| 729 | } |
| 730 | #ifndef __MINGW32__ |
| 731 | /* Unix implementation */ |
| 732 | if( g.argv[1][0]=='u' ){ |
| 733 | #if !defined(__DARWIN__) && !defined(__APPLE__) |
| 734 | zBrowser = db_get("web-browser", "firefox"); |
| 735 |