Fossil SCM

Do not run backoffice if the "--in" option is used on the "fossil http" command.

drh 2018-11-10 14:17 trunk
Commit afb1e5f6cfecc8b7ed10f62228656fbd1ce7651e9e46880f74222e9175aae33c
--- src/backoffice.c
+++ src/backoffice.c
@@ -393,10 +393,17 @@
393393
}else{
394394
/* We need to run backup to be (at a minimum) on-deck */
395395
backofficeDb = fossil_strdup(g.zRepositoryName);
396396
}
397397
}
398
+
399
+/*
400
+** Call this routine to disable backoffice
401
+*/
402
+void backoffice_disable(void){
403
+ backofficeDb = "x";
404
+}
398405
399406
/*
400407
** Check for errors prior to running backoffice_thread() or backoffice_run().
401408
*/
402409
static void backoffice_error_check_one(int *pOnce){
403410
--- src/backoffice.c
+++ src/backoffice.c
@@ -393,10 +393,17 @@
393 }else{
394 /* We need to run backup to be (at a minimum) on-deck */
395 backofficeDb = fossil_strdup(g.zRepositoryName);
396 }
397 }
 
 
 
 
 
 
 
398
399 /*
400 ** Check for errors prior to running backoffice_thread() or backoffice_run().
401 */
402 static void backoffice_error_check_one(int *pOnce){
403
--- src/backoffice.c
+++ src/backoffice.c
@@ -393,10 +393,17 @@
393 }else{
394 /* We need to run backup to be (at a minimum) on-deck */
395 backofficeDb = fossil_strdup(g.zRepositoryName);
396 }
397 }
398
399 /*
400 ** Call this routine to disable backoffice
401 */
402 void backoffice_disable(void){
403 backofficeDb = "x";
404 }
405
406 /*
407 ** Check for errors prior to running backoffice_thread() or backoffice_run().
408 */
409 static void backoffice_error_check_one(int *pOnce){
410
+1
--- src/main.c
+++ src/main.c
@@ -2233,10 +2233,11 @@
22332233
g.useLocalauth = find_option("localauth", 0, 0)!=0;
22342234
g.sslNotAvailable = find_option("nossl", 0, 0)!=0;
22352235
g.fNoHttpCompress = find_option("nocompress",0,0)!=0;
22362236
zInFile = find_option("in",0,1);
22372237
if( zInFile ){
2238
+ backoffice_disable();
22382239
g.httpIn = fossil_fopen(zInFile, "rb");
22392240
if( g.httpIn==0 ) fossil_fatal("cannot open \"%s\" for reading", zInFile);
22402241
}else{
22412242
g.httpIn = stdin;
22422243
}
22432244
--- src/main.c
+++ src/main.c
@@ -2233,10 +2233,11 @@
2233 g.useLocalauth = find_option("localauth", 0, 0)!=0;
2234 g.sslNotAvailable = find_option("nossl", 0, 0)!=0;
2235 g.fNoHttpCompress = find_option("nocompress",0,0)!=0;
2236 zInFile = find_option("in",0,1);
2237 if( zInFile ){
 
2238 g.httpIn = fossil_fopen(zInFile, "rb");
2239 if( g.httpIn==0 ) fossil_fatal("cannot open \"%s\" for reading", zInFile);
2240 }else{
2241 g.httpIn = stdin;
2242 }
2243
--- src/main.c
+++ src/main.c
@@ -2233,10 +2233,11 @@
2233 g.useLocalauth = find_option("localauth", 0, 0)!=0;
2234 g.sslNotAvailable = find_option("nossl", 0, 0)!=0;
2235 g.fNoHttpCompress = find_option("nocompress",0,0)!=0;
2236 zInFile = find_option("in",0,1);
2237 if( zInFile ){
2238 backoffice_disable();
2239 g.httpIn = fossil_fopen(zInFile, "rb");
2240 if( g.httpIn==0 ) fossil_fatal("cannot open \"%s\" for reading", zInFile);
2241 }else{
2242 g.httpIn = stdin;
2243 }
2244

Keyboard Shortcuts

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