Fossil SCM

Updates to the check-in locking protocol. The check-in lock timeout now defaults to 60 seconds, but the lock is renewed and fork and close-branch tests are repeated after an interactive check-in comment entry.

drh 2019-09-17 18:33 trunk
Commit 18d588015bd508c5ab57d973b00542ef525c39c9c9da0f509e9891b99883cffa
3 files changed +94 -69 +3 -3 +1 -1
+94 -69
--- src/checkin.c
+++ src/checkin.c
@@ -2067,13 +2067,14 @@
20672067
Blob cksum1, cksum2; /* Before and after commit checksums */
20682068
Blob cksum1b; /* Checksum recorded in the manifest */
20692069
int szD; /* Size of the delta manifest */
20702070
int szB; /* Size of the baseline manifest */
20712071
int nConflict = 0; /* Number of unresolved merge conflicts */
2072
- int abortCommit = 0;
2073
- Blob ans;
2074
- char cReply;
2072
+ int abortCommit = 0; /* Abort the commit due to text format conversions */
2073
+ Blob ans; /* Answer to continuation prompts */
2074
+ char cReply; /* First character of ans */
2075
+ int bRecheck = 0; /* Repeat fork and closed-branch checks*/
20752076
20762077
memset(&sCiInfo, 0, sizeof(sCiInfo));
20772078
url_proxy_options();
20782079
/* --sha1sum is an undocumented alias for --hash for backwards compatiblity */
20792080
useHash = find_option("hash",0,0)!=0 || find_option("sha1sum",0,0)!=0;
@@ -2273,72 +2274,100 @@
22732274
){
22742275
fossil_fatal("none of the selected files have changed; use "
22752276
"--allow-empty to override.");
22762277
}
22772278
2278
- /*
2279
- ** Do not allow a commit that will cause a fork unless the --allow-fork
2280
- ** or --force flags is used, or unless this is a private check-in.
2281
- ** The initial commit MUST have tags "trunk" and "sym-trunk".
2282
- */
2283
- if( sCiInfo.zBranch==0
2284
- && allowFork==0
2285
- && forceFlag==0
2286
- && g.markPrivate==0
2287
- && (vid==0 || !is_a_leaf(vid) || g.ckinLockFail)
2288
- ){
2289
- if( g.ckinLockFail ){
2290
- fossil_fatal("Might fork due to a check-in race with user \"%s\"\n"
2291
- "Try \"update\" first, or --branch, or use --override-lock",
2292
- g.ckinLockFail);
2293
- }else{
2294
- fossil_fatal("Would fork. \"update\" first or use --branch or "
2295
- "--allow-fork.");
2296
- }
2297
- }
2298
-
2299
- /*
2300
- ** Do not allow a commit against a closed leaf unless the commit
2301
- ** ends up on a different branch.
2302
- */
2303
- if(
2304
- /* parent check-in has the "closed" tag... */
2305
- db_exists("SELECT 1 FROM tagxref"
2306
- " WHERE tagid=%d AND rid=%d AND tagtype>0",
2307
- TAG_CLOSED, vid)
2308
- /* ... and the new check-in has no --branch option or the --branch
2309
- ** option does not actually change the branch */
2310
- && (sCiInfo.zBranch==0
2311
- || db_exists("SELECT 1 FROM tagxref"
2312
- " WHERE tagid=%d AND rid=%d AND tagtype>0"
2313
- " AND value=%Q", TAG_BRANCH, vid, sCiInfo.zBranch))
2314
- ){
2315
- fossil_fatal("cannot commit against a closed leaf");
2316
- }
2317
-
2318
- if( zComment ){
2319
- blob_zero(&comment);
2320
- blob_append(&comment, zComment, -1);
2321
- }else if( zComFile ){
2322
- blob_zero(&comment);
2323
- blob_read_from_file(&comment, zComFile, ExtFILE);
2324
- blob_to_utf8_no_bom(&comment, 1);
2325
- }else if( dryRunFlag ){
2326
- blob_zero(&comment);
2327
- }else if( !noPrompt ){
2328
- char *zInit = db_text(0, "SELECT value FROM vvar WHERE name='ci-comment'");
2329
- prepare_commit_comment(&comment, zInit, &sCiInfo, vid);
2330
- if( zInit && zInit[0] && fossil_strcmp(zInit, blob_str(&comment))==0 ){
2331
- prompt_user("unchanged check-in comment. continue (y/N)? ", &ans);
2332
- cReply = blob_str(&ans)[0];
2333
- blob_reset(&ans);
2334
- if( cReply!='y' && cReply!='Y' ){
2335
- fossil_exit(1);
2336
- }
2337
- }
2338
- free(zInit);
2339
- }
2279
+ /* This loop checks for potential forks and for check-ins against a
2280
+ ** closed branch. The checks are repeated once after interactive
2281
+ ** check-in comment editing.
2282
+ */
2283
+ do{
2284
+ /*
2285
+ ** Do not allow a commit that will cause a fork unless the --allow-fork
2286
+ ** or --force flags is used, or unless this is a private check-in.
2287
+ ** The initial commit MUST have tags "trunk" and "sym-trunk".
2288
+ */
2289
+ if( sCiInfo.zBranch==0
2290
+ && allowFork==0
2291
+ && forceFlag==0
2292
+ && g.markPrivate==0
2293
+ && (vid==0 || !is_a_leaf(vid) || g.ckinLockFail)
2294
+ ){
2295
+ if( g.ckinLockFail ){
2296
+ fossil_fatal("Might fork due to a check-in race with user \"%s\"\n"
2297
+ "Try \"update\" first, or --branch, or "
2298
+ "use --override-lock",
2299
+ g.ckinLockFail);
2300
+ }else{
2301
+ fossil_fatal("Would fork. \"update\" first or use --branch or "
2302
+ "--allow-fork.");
2303
+ }
2304
+ }
2305
+
2306
+ /*
2307
+ ** Do not allow a commit against a closed leaf unless the commit
2308
+ ** ends up on a different branch.
2309
+ */
2310
+ if(
2311
+ /* parent check-in has the "closed" tag... */
2312
+ db_exists("SELECT 1 FROM tagxref"
2313
+ " WHERE tagid=%d AND rid=%d AND tagtype>0",
2314
+ TAG_CLOSED, vid)
2315
+ /* ... and the new check-in has no --branch option or the --branch
2316
+ ** option does not actually change the branch */
2317
+ && (sCiInfo.zBranch==0
2318
+ || db_exists("SELECT 1 FROM tagxref"
2319
+ " WHERE tagid=%d AND rid=%d AND tagtype>0"
2320
+ " AND value=%Q", TAG_BRANCH, vid, sCiInfo.zBranch))
2321
+ ){
2322
+ fossil_fatal("cannot commit against a closed leaf");
2323
+ }
2324
+
2325
+ /* Always exit the loop on the second pass */
2326
+ if( bRecheck ) break;
2327
+
2328
+ /* Get the check-in comment. This might involve prompting the
2329
+ ** user for the check-in comment, in which case we should resync
2330
+ ** to renew the check-in lock and repeat the checks for conflicts.
2331
+ */
2332
+ if( zComment ){
2333
+ blob_zero(&comment);
2334
+ blob_append(&comment, zComment, -1);
2335
+ }else if( zComFile ){
2336
+ blob_zero(&comment);
2337
+ blob_read_from_file(&comment, zComFile, ExtFILE);
2338
+ blob_to_utf8_no_bom(&comment, 1);
2339
+ }else if( dryRunFlag ){
2340
+ blob_zero(&comment);
2341
+ }else if( !noPrompt ){
2342
+ char *zInit = db_text(0,"SELECT value FROM vvar WHERE name='ci-comment'");
2343
+ prepare_commit_comment(&comment, zInit, &sCiInfo, vid);
2344
+ if( zInit && zInit[0] && fossil_strcmp(zInit, blob_str(&comment))==0 ){
2345
+ prompt_user("unchanged check-in comment. continue (y/N)? ", &ans);
2346
+ cReply = blob_str(&ans)[0];
2347
+ blob_reset(&ans);
2348
+ if( cReply!='y' && cReply!='Y' ){
2349
+ fossil_exit(1);
2350
+ }
2351
+ }
2352
+ free(zInit);
2353
+ db_multi_exec("REPLACE INTO vvar VALUES('ci-comment',%B)", &comment);
2354
+ db_end_transaction(0);
2355
+ db_begin_transaction();
2356
+ if( !g.markPrivate && vid!=0 && !allowFork && !forceFlag ){
2357
+ /* Do another auto-pull, renewing the check-in lock. Then set
2358
+ ** bRecheck so that we loop back above to verify that the check-in
2359
+ ** is still not against a closed branch and still won't fork. */
2360
+ int syncFlags = SYNC_PULL|SYNC_CKIN_LOCK;
2361
+ if( autosync_loop(syncFlags, db_get_int("autosync-tries", 1), 1) ){
2362
+ fossil_exit(1);
2363
+ }
2364
+ bRecheck = 1;
2365
+ }
2366
+ }
2367
+ }while( bRecheck );
2368
+
23402369
if( blob_size(&comment)==0 ){
23412370
if( !dryRunFlag ){
23422371
if( !noPrompt ){
23432372
prompt_user("empty check-in comment. continue (y/N)? ", &ans);
23442373
cReply = blob_str(&ans)[0];
@@ -2349,14 +2378,10 @@
23492378
}
23502379
if( cReply!='y' && cReply!='Y' ){
23512380
fossil_exit(1);
23522381
}
23532382
}
2354
- }else{
2355
- db_multi_exec("REPLACE INTO vvar VALUES('ci-comment',%B)", &comment);
2356
- db_end_transaction(0);
2357
- db_begin_transaction();
23582383
}
23592384
23602385
/*
23612386
** Step 1: Compute an aggregate MD5 checksum over the disk image
23622387
** of every file in vid. The file names are part of the checksum.
23632388
--- src/checkin.c
+++ src/checkin.c
@@ -2067,13 +2067,14 @@
2067 Blob cksum1, cksum2; /* Before and after commit checksums */
2068 Blob cksum1b; /* Checksum recorded in the manifest */
2069 int szD; /* Size of the delta manifest */
2070 int szB; /* Size of the baseline manifest */
2071 int nConflict = 0; /* Number of unresolved merge conflicts */
2072 int abortCommit = 0;
2073 Blob ans;
2074 char cReply;
 
2075
2076 memset(&sCiInfo, 0, sizeof(sCiInfo));
2077 url_proxy_options();
2078 /* --sha1sum is an undocumented alias for --hash for backwards compatiblity */
2079 useHash = find_option("hash",0,0)!=0 || find_option("sha1sum",0,0)!=0;
@@ -2273,72 +2274,100 @@
2273 ){
2274 fossil_fatal("none of the selected files have changed; use "
2275 "--allow-empty to override.");
2276 }
2277
2278 /*
2279 ** Do not allow a commit that will cause a fork unless the --allow-fork
2280 ** or --force flags is used, or unless this is a private check-in.
2281 ** The initial commit MUST have tags "trunk" and "sym-trunk".
2282 */
2283 if( sCiInfo.zBranch==0
2284 && allowFork==0
2285 && forceFlag==0
2286 && g.markPrivate==0
2287 && (vid==0 || !is_a_leaf(vid) || g.ckinLockFail)
2288 ){
2289 if( g.ckinLockFail ){
2290 fossil_fatal("Might fork due to a check-in race with user \"%s\"\n"
2291 "Try \"update\" first, or --branch, or use --override-lock",
2292 g.ckinLockFail);
2293 }else{
2294 fossil_fatal("Would fork. \"update\" first or use --branch or "
2295 "--allow-fork.");
2296 }
2297 }
2298
2299 /*
2300 ** Do not allow a commit against a closed leaf unless the commit
2301 ** ends up on a different branch.
2302 */
2303 if(
2304 /* parent check-in has the "closed" tag... */
2305 db_exists("SELECT 1 FROM tagxref"
2306 " WHERE tagid=%d AND rid=%d AND tagtype>0",
2307 TAG_CLOSED, vid)
2308 /* ... and the new check-in has no --branch option or the --branch
2309 ** option does not actually change the branch */
2310 && (sCiInfo.zBranch==0
2311 || db_exists("SELECT 1 FROM tagxref"
2312 " WHERE tagid=%d AND rid=%d AND tagtype>0"
2313 " AND value=%Q", TAG_BRANCH, vid, sCiInfo.zBranch))
2314 ){
2315 fossil_fatal("cannot commit against a closed leaf");
2316 }
2317
2318 if( zComment ){
2319 blob_zero(&comment);
2320 blob_append(&comment, zComment, -1);
2321 }else if( zComFile ){
2322 blob_zero(&comment);
2323 blob_read_from_file(&comment, zComFile, ExtFILE);
2324 blob_to_utf8_no_bom(&comment, 1);
2325 }else if( dryRunFlag ){
2326 blob_zero(&comment);
2327 }else if( !noPrompt ){
2328 char *zInit = db_text(0, "SELECT value FROM vvar WHERE name='ci-comment'");
2329 prepare_commit_comment(&comment, zInit, &sCiInfo, vid);
2330 if( zInit && zInit[0] && fossil_strcmp(zInit, blob_str(&comment))==0 ){
2331 prompt_user("unchanged check-in comment. continue (y/N)? ", &ans);
2332 cReply = blob_str(&ans)[0];
2333 blob_reset(&ans);
2334 if( cReply!='y' && cReply!='Y' ){
2335 fossil_exit(1);
2336 }
2337 }
2338 free(zInit);
2339 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2340 if( blob_size(&comment)==0 ){
2341 if( !dryRunFlag ){
2342 if( !noPrompt ){
2343 prompt_user("empty check-in comment. continue (y/N)? ", &ans);
2344 cReply = blob_str(&ans)[0];
@@ -2349,14 +2378,10 @@
2349 }
2350 if( cReply!='y' && cReply!='Y' ){
2351 fossil_exit(1);
2352 }
2353 }
2354 }else{
2355 db_multi_exec("REPLACE INTO vvar VALUES('ci-comment',%B)", &comment);
2356 db_end_transaction(0);
2357 db_begin_transaction();
2358 }
2359
2360 /*
2361 ** Step 1: Compute an aggregate MD5 checksum over the disk image
2362 ** of every file in vid. The file names are part of the checksum.
2363
--- src/checkin.c
+++ src/checkin.c
@@ -2067,13 +2067,14 @@
2067 Blob cksum1, cksum2; /* Before and after commit checksums */
2068 Blob cksum1b; /* Checksum recorded in the manifest */
2069 int szD; /* Size of the delta manifest */
2070 int szB; /* Size of the baseline manifest */
2071 int nConflict = 0; /* Number of unresolved merge conflicts */
2072 int abortCommit = 0; /* Abort the commit due to text format conversions */
2073 Blob ans; /* Answer to continuation prompts */
2074 char cReply; /* First character of ans */
2075 int bRecheck = 0; /* Repeat fork and closed-branch checks*/
2076
2077 memset(&sCiInfo, 0, sizeof(sCiInfo));
2078 url_proxy_options();
2079 /* --sha1sum is an undocumented alias for --hash for backwards compatiblity */
2080 useHash = find_option("hash",0,0)!=0 || find_option("sha1sum",0,0)!=0;
@@ -2273,72 +2274,100 @@
2274 ){
2275 fossil_fatal("none of the selected files have changed; use "
2276 "--allow-empty to override.");
2277 }
2278
2279 /* This loop checks for potential forks and for check-ins against a
2280 ** closed branch. The checks are repeated once after interactive
2281 ** check-in comment editing.
2282 */
2283 do{
2284 /*
2285 ** Do not allow a commit that will cause a fork unless the --allow-fork
2286 ** or --force flags is used, or unless this is a private check-in.
2287 ** The initial commit MUST have tags "trunk" and "sym-trunk".
2288 */
2289 if( sCiInfo.zBranch==0
2290 && allowFork==0
2291 && forceFlag==0
2292 && g.markPrivate==0
2293 && (vid==0 || !is_a_leaf(vid) || g.ckinLockFail)
2294 ){
2295 if( g.ckinLockFail ){
2296 fossil_fatal("Might fork due to a check-in race with user \"%s\"\n"
2297 "Try \"update\" first, or --branch, or "
2298 "use --override-lock",
2299 g.ckinLockFail);
2300 }else{
2301 fossil_fatal("Would fork. \"update\" first or use --branch or "
2302 "--allow-fork.");
2303 }
2304 }
2305
2306 /*
2307 ** Do not allow a commit against a closed leaf unless the commit
2308 ** ends up on a different branch.
2309 */
2310 if(
2311 /* parent check-in has the "closed" tag... */
2312 db_exists("SELECT 1 FROM tagxref"
2313 " WHERE tagid=%d AND rid=%d AND tagtype>0",
2314 TAG_CLOSED, vid)
2315 /* ... and the new check-in has no --branch option or the --branch
2316 ** option does not actually change the branch */
2317 && (sCiInfo.zBranch==0
2318 || db_exists("SELECT 1 FROM tagxref"
2319 " WHERE tagid=%d AND rid=%d AND tagtype>0"
2320 " AND value=%Q", TAG_BRANCH, vid, sCiInfo.zBranch))
2321 ){
2322 fossil_fatal("cannot commit against a closed leaf");
2323 }
2324
2325 /* Always exit the loop on the second pass */
2326 if( bRecheck ) break;
2327
2328 /* Get the check-in comment. This might involve prompting the
2329 ** user for the check-in comment, in which case we should resync
2330 ** to renew the check-in lock and repeat the checks for conflicts.
2331 */
2332 if( zComment ){
2333 blob_zero(&comment);
2334 blob_append(&comment, zComment, -1);
2335 }else if( zComFile ){
2336 blob_zero(&comment);
2337 blob_read_from_file(&comment, zComFile, ExtFILE);
2338 blob_to_utf8_no_bom(&comment, 1);
2339 }else if( dryRunFlag ){
2340 blob_zero(&comment);
2341 }else if( !noPrompt ){
2342 char *zInit = db_text(0,"SELECT value FROM vvar WHERE name='ci-comment'");
2343 prepare_commit_comment(&comment, zInit, &sCiInfo, vid);
2344 if( zInit && zInit[0] && fossil_strcmp(zInit, blob_str(&comment))==0 ){
2345 prompt_user("unchanged check-in comment. continue (y/N)? ", &ans);
2346 cReply = blob_str(&ans)[0];
2347 blob_reset(&ans);
2348 if( cReply!='y' && cReply!='Y' ){
2349 fossil_exit(1);
2350 }
2351 }
2352 free(zInit);
2353 db_multi_exec("REPLACE INTO vvar VALUES('ci-comment',%B)", &comment);
2354 db_end_transaction(0);
2355 db_begin_transaction();
2356 if( !g.markPrivate && vid!=0 && !allowFork && !forceFlag ){
2357 /* Do another auto-pull, renewing the check-in lock. Then set
2358 ** bRecheck so that we loop back above to verify that the check-in
2359 ** is still not against a closed branch and still won't fork. */
2360 int syncFlags = SYNC_PULL|SYNC_CKIN_LOCK;
2361 if( autosync_loop(syncFlags, db_get_int("autosync-tries", 1), 1) ){
2362 fossil_exit(1);
2363 }
2364 bRecheck = 1;
2365 }
2366 }
2367 }while( bRecheck );
2368
2369 if( blob_size(&comment)==0 ){
2370 if( !dryRunFlag ){
2371 if( !noPrompt ){
2372 prompt_user("empty check-in comment. continue (y/N)? ", &ans);
2373 cReply = blob_str(&ans)[0];
@@ -2349,14 +2378,10 @@
2378 }
2379 if( cReply!='y' && cReply!='Y' ){
2380 fossil_exit(1);
2381 }
2382 }
 
 
 
 
2383 }
2384
2385 /*
2386 ** Step 1: Compute an aggregate MD5 checksum over the disk image
2387 ** of every file in vid. The file names are part of the checksum.
2388
+3 -3
--- src/db.c
+++ src/db.c
@@ -3390,13 +3390,13 @@
33903390
** especially on cloned repositories on workstations. Leaving
33913391
** "localauth" at 0 makes the "fossil ui" command more convenient
33923392
** to use.
33933393
*/
33943394
/*
3395
-** SETTING: lock-timeout width=25 default=86400
3395
+** SETTING: lock-timeout width=25 default=60
33963396
** This is the number of seconds that a check-in lock will be held on
3397
-** the server before the lock expires. The default is a 24-hour delay.
3397
+** the server before the lock expires. The default is a 60-second delay.
33983398
** Set this value to zero to disable the check-in lock mechanism.
33993399
**
34003400
** This value should be set on the server to which users auto-sync
34013401
** their work. This setting has no affect on client repositories. The
34023402
** check-in lock mechanism is only effective if all users are auto-syncing
@@ -3403,11 +3403,11 @@
34033403
** to the same server.
34043404
**
34053405
** Check-in locks are an advisory mechanism designed to help prevent
34063406
** accidental forks due to a check-in race in installations where many
34073407
** user are committing to the same branch and auto-sync is enabled.
3408
-** As forks are harmless, there is no harm in disabling this mechanism.
3408
+** As forks are harmless, there is no danger in disabling this mechanism.
34093409
** However, keeping check-in locks turned on can help prevent unnecessary
34103410
** confusion.
34113411
*/
34123412
/*
34133413
** SETTING: main-branch width=40 default=trunk
34143414
--- src/db.c
+++ src/db.c
@@ -3390,13 +3390,13 @@
3390 ** especially on cloned repositories on workstations. Leaving
3391 ** "localauth" at 0 makes the "fossil ui" command more convenient
3392 ** to use.
3393 */
3394 /*
3395 ** SETTING: lock-timeout width=25 default=86400
3396 ** This is the number of seconds that a check-in lock will be held on
3397 ** the server before the lock expires. The default is a 24-hour delay.
3398 ** Set this value to zero to disable the check-in lock mechanism.
3399 **
3400 ** This value should be set on the server to which users auto-sync
3401 ** their work. This setting has no affect on client repositories. The
3402 ** check-in lock mechanism is only effective if all users are auto-syncing
@@ -3403,11 +3403,11 @@
3403 ** to the same server.
3404 **
3405 ** Check-in locks are an advisory mechanism designed to help prevent
3406 ** accidental forks due to a check-in race in installations where many
3407 ** user are committing to the same branch and auto-sync is enabled.
3408 ** As forks are harmless, there is no harm in disabling this mechanism.
3409 ** However, keeping check-in locks turned on can help prevent unnecessary
3410 ** confusion.
3411 */
3412 /*
3413 ** SETTING: main-branch width=40 default=trunk
3414
--- src/db.c
+++ src/db.c
@@ -3390,13 +3390,13 @@
3390 ** especially on cloned repositories on workstations. Leaving
3391 ** "localauth" at 0 makes the "fossil ui" command more convenient
3392 ** to use.
3393 */
3394 /*
3395 ** SETTING: lock-timeout width=25 default=60
3396 ** This is the number of seconds that a check-in lock will be held on
3397 ** the server before the lock expires. The default is a 60-second delay.
3398 ** Set this value to zero to disable the check-in lock mechanism.
3399 **
3400 ** This value should be set on the server to which users auto-sync
3401 ** their work. This setting has no affect on client repositories. The
3402 ** check-in lock mechanism is only effective if all users are auto-syncing
@@ -3403,11 +3403,11 @@
3403 ** to the same server.
3404 **
3405 ** Check-in locks are an advisory mechanism designed to help prevent
3406 ** accidental forks due to a check-in race in installations where many
3407 ** user are committing to the same branch and auto-sync is enabled.
3408 ** As forks are harmless, there is no danger in disabling this mechanism.
3409 ** However, keeping check-in locks turned on can help prevent unnecessary
3410 ** confusion.
3411 */
3412 /*
3413 ** SETTING: main-branch width=40 default=trunk
3414
+1 -1
--- src/xfer.c
+++ src/xfer.c
@@ -1559,11 +1559,11 @@
15591559
&& xfer.nToken==4
15601560
&& blob_is_hname(&xfer.aToken[2])
15611561
){
15621562
Stmt q;
15631563
sqlite3_int64 iNow = time(0);
1564
- sqlite3_int64 maxAge = db_get_int("lock-timeout",3600*24);
1564
+ sqlite3_int64 maxAge = db_get_int("lock-timeout",60);
15651565
int seenFault = 0;
15661566
db_prepare(&q,
15671567
"SELECT json_extract(value,'$.login'),"
15681568
" mtime,"
15691569
" json_extract(value,'$.clientid'),"
15701570
--- src/xfer.c
+++ src/xfer.c
@@ -1559,11 +1559,11 @@
1559 && xfer.nToken==4
1560 && blob_is_hname(&xfer.aToken[2])
1561 ){
1562 Stmt q;
1563 sqlite3_int64 iNow = time(0);
1564 sqlite3_int64 maxAge = db_get_int("lock-timeout",3600*24);
1565 int seenFault = 0;
1566 db_prepare(&q,
1567 "SELECT json_extract(value,'$.login'),"
1568 " mtime,"
1569 " json_extract(value,'$.clientid'),"
1570
--- src/xfer.c
+++ src/xfer.c
@@ -1559,11 +1559,11 @@
1559 && xfer.nToken==4
1560 && blob_is_hname(&xfer.aToken[2])
1561 ){
1562 Stmt q;
1563 sqlite3_int64 iNow = time(0);
1564 sqlite3_int64 maxAge = db_get_int("lock-timeout",60);
1565 int seenFault = 0;
1566 db_prepare(&q,
1567 "SELECT json_extract(value,'$.login'),"
1568 " mtime,"
1569 " json_extract(value,'$.clientid'),"
1570

Keyboard Shortcuts

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