Fossil SCM

Add the http-port setting used to specify the default TCP/IP port for the built-in webserver. Ticket [7168128e09].

drh 2008-11-09 16:23 trunk
Commit 02f09cdd6c1bbea61002c82628bdf05629211207
2 files changed +4 +5 -5
+4
--- src/db.c
+++ src/db.c
@@ -1288,10 +1288,13 @@
12881288
**
12891289
** diff-command External command to run when performing a diff.
12901290
** If undefined, the internal text diff will be used.
12911291
**
12921292
** 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
12931296
**
12941297
** gdiff-command External command to run when performing a graphical
12951298
** diff. If undefined, text diff will be used.
12961299
**
12971300
** localauth If enabled, require that HTTP connections from
@@ -1320,10 +1323,11 @@
13201323
static const char *azName[] = {
13211324
"autosync",
13221325
"diff-command",
13231326
"editor",
13241327
"gdiff-command",
1328
+ "http-port",
13251329
"localauth",
13261330
"clearsign",
13271331
"pgp-command",
13281332
"proxy",
13291333
"web-browser",
13301334
--- 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 @@
714714
g.thTrace = find_option("th-trace", 0, 0)!=0;
715715
if( g.thTrace ){
716716
blob_zero(&g.thLog);
717717
}
718718
zPort = find_option("port", "P", 1);
719
- if( zPort ){
720
- iPort = atoi(zPort);
721
- }else{
722
- iPort = 8080;
723
- }
724719
if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?");
725720
if( g.argc==2 ){
726721
db_must_be_within_tree();
727722
}else{
728723
db_open_repository(g.argv[2]);
729724
}
725
+ if( zPort ){
726
+ iPort = atoi(zPort);
727
+ }else{
728
+ iPort = db_get_int("http-port", 8080);
729
+ }
730730
#ifndef __MINGW32__
731731
/* Unix implementation */
732732
if( g.argv[1][0]=='u' ){
733733
#if !defined(__DARWIN__) && !defined(__APPLE__)
734734
zBrowser = db_get("web-browser", "firefox");
735735
--- 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

Keyboard Shortcuts

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