Fossil SCM

Issue a panic if there is an attempt to invoke backoffice_run() more than once.

drh 2018-07-21 14:29 trunk
Commit 9d0bfcb3d8b75144dfe05a2f08341a7401fab2e30442dc72b77498120a167540
1 file changed +5
--- src/backoffice.c
+++ src/backoffice.c
@@ -185,11 +185,16 @@
185185
Lease x;
186186
sqlite3_uint64 tmNow;
187187
sqlite3_uint64 idSelf;
188188
int lastWarning = 0;
189189
int warningDelay = 30;
190
+ static int once = 0;
190191
192
+ if( once ){
193
+ fossil_panic("multiple calls to backoffice_run()");
194
+ }
195
+ once = 1;
191196
if( g.db==0 ){
192197
fossil_panic("database not open for backoffice processing");
193198
}
194199
if( db_transaction_nesting_depth()!=0 ){
195200
fossil_panic("transaction %s not closed prior to backoffice processing",
196201
--- src/backoffice.c
+++ src/backoffice.c
@@ -185,11 +185,16 @@
185 Lease x;
186 sqlite3_uint64 tmNow;
187 sqlite3_uint64 idSelf;
188 int lastWarning = 0;
189 int warningDelay = 30;
 
190
 
 
 
 
191 if( g.db==0 ){
192 fossil_panic("database not open for backoffice processing");
193 }
194 if( db_transaction_nesting_depth()!=0 ){
195 fossil_panic("transaction %s not closed prior to backoffice processing",
196
--- src/backoffice.c
+++ src/backoffice.c
@@ -185,11 +185,16 @@
185 Lease x;
186 sqlite3_uint64 tmNow;
187 sqlite3_uint64 idSelf;
188 int lastWarning = 0;
189 int warningDelay = 30;
190 static int once = 0;
191
192 if( once ){
193 fossil_panic("multiple calls to backoffice_run()");
194 }
195 once = 1;
196 if( g.db==0 ){
197 fossil_panic("database not open for backoffice processing");
198 }
199 if( db_transaction_nesting_depth()!=0 ){
200 fossil_panic("transaction %s not closed prior to backoffice processing",
201

Keyboard Shortcuts

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