Fossil SCM
merge trunk
Commit
7f939bd8d7148059f4097c303cf4e00619ef36b1
Parent
d2e1469d1228db6…
8 files changed
+2
-2
+2
-2
+32
+2
-2
+9
-5
+1
-1
+6
+1
-1
+2
-2
| --- src/captcha.c | ||
| +++ src/captcha.c | ||
| @@ -98,11 +98,11 @@ | ||
| 98 | 98 | } |
| 99 | 99 | #endif /* CAPTCHA==1 */ |
| 100 | 100 | |
| 101 | 101 | |
| 102 | 102 | #if CAPTCHA==2 |
| 103 | -static const char *azFont2[] = { | |
| 103 | +static const char *const azFont2[] = { | |
| 104 | 104 | /* 0 */ |
| 105 | 105 | " __ ", |
| 106 | 106 | " / \\ ", |
| 107 | 107 | "| () |", |
| 108 | 108 | " \\__/ ", |
| @@ -223,11 +223,11 @@ | ||
| 223 | 223 | return z; |
| 224 | 224 | } |
| 225 | 225 | #endif /* CAPTCHA==2 */ |
| 226 | 226 | |
| 227 | 227 | #if CAPTCHA==3 |
| 228 | -static const char *azFont3[] = { | |
| 228 | +static const char *const azFont3[] = { | |
| 229 | 229 | /* 0 */ |
| 230 | 230 | " ___ ", |
| 231 | 231 | " / _ \\ ", |
| 232 | 232 | "| | | |", |
| 233 | 233 | "| | | |", |
| 234 | 234 |
| --- src/captcha.c | |
| +++ src/captcha.c | |
| @@ -98,11 +98,11 @@ | |
| 98 | } |
| 99 | #endif /* CAPTCHA==1 */ |
| 100 | |
| 101 | |
| 102 | #if CAPTCHA==2 |
| 103 | static const char *azFont2[] = { |
| 104 | /* 0 */ |
| 105 | " __ ", |
| 106 | " / \\ ", |
| 107 | "| () |", |
| 108 | " \\__/ ", |
| @@ -223,11 +223,11 @@ | |
| 223 | return z; |
| 224 | } |
| 225 | #endif /* CAPTCHA==2 */ |
| 226 | |
| 227 | #if CAPTCHA==3 |
| 228 | static const char *azFont3[] = { |
| 229 | /* 0 */ |
| 230 | " ___ ", |
| 231 | " / _ \\ ", |
| 232 | "| | | |", |
| 233 | "| | | |", |
| 234 |
| --- src/captcha.c | |
| +++ src/captcha.c | |
| @@ -98,11 +98,11 @@ | |
| 98 | } |
| 99 | #endif /* CAPTCHA==1 */ |
| 100 | |
| 101 | |
| 102 | #if CAPTCHA==2 |
| 103 | static const char *const azFont2[] = { |
| 104 | /* 0 */ |
| 105 | " __ ", |
| 106 | " / \\ ", |
| 107 | "| () |", |
| 108 | " \\__/ ", |
| @@ -223,11 +223,11 @@ | |
| 223 | return z; |
| 224 | } |
| 225 | #endif /* CAPTCHA==2 */ |
| 226 | |
| 227 | #if CAPTCHA==3 |
| 228 | static const char *const azFont3[] = { |
| 229 | /* 0 */ |
| 230 | " ___ ", |
| 231 | " / _ \\ ", |
| 232 | "| | | |", |
| 233 | "| | | |", |
| 234 |
+2
-2
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -1354,13 +1354,13 @@ | ||
| 1354 | 1354 | |
| 1355 | 1355 | |
| 1356 | 1356 | /* |
| 1357 | 1357 | ** Name of days and months. |
| 1358 | 1358 | */ |
| 1359 | -static const char *azDays[] = | |
| 1359 | +static const char *const azDays[] = | |
| 1360 | 1360 | {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", 0}; |
| 1361 | -static const char *azMonths[] = | |
| 1361 | +static const char *const azMonths[] = | |
| 1362 | 1362 | {"Jan", "Feb", "Mar", "Apr", "May", "Jun", |
| 1363 | 1363 | "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", 0}; |
| 1364 | 1364 | |
| 1365 | 1365 | |
| 1366 | 1366 | /* |
| 1367 | 1367 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -1354,13 +1354,13 @@ | |
| 1354 | |
| 1355 | |
| 1356 | /* |
| 1357 | ** Name of days and months. |
| 1358 | */ |
| 1359 | static const char *azDays[] = |
| 1360 | {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", 0}; |
| 1361 | static const char *azMonths[] = |
| 1362 | {"Jan", "Feb", "Mar", "Apr", "May", "Jun", |
| 1363 | "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", 0}; |
| 1364 | |
| 1365 | |
| 1366 | /* |
| 1367 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -1354,13 +1354,13 @@ | |
| 1354 | |
| 1355 | |
| 1356 | /* |
| 1357 | ** Name of days and months. |
| 1358 | */ |
| 1359 | static const char *const azDays[] = |
| 1360 | {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", 0}; |
| 1361 | static const char *const azMonths[] = |
| 1362 | {"Jan", "Feb", "Mar", "Apr", "May", "Jun", |
| 1363 | "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", 0}; |
| 1364 | |
| 1365 | |
| 1366 | /* |
| 1367 |
+32
| --- src/content.c | ||
| +++ src/content.c | ||
| @@ -894,5 +894,37 @@ | ||
| 894 | 894 | } |
| 895 | 895 | db_finalize(&q); |
| 896 | 896 | fossil_print("%d non-phantom blobs (out of %d total) checked: %d errors\n", |
| 897 | 897 | n2, n1, nErr); |
| 898 | 898 | } |
| 899 | + | |
| 900 | +/* | |
| 901 | +** COMMAND: test-orphans | |
| 902 | +** | |
| 903 | +** Search the repository for orphaned artifacts | |
| 904 | +*/ | |
| 905 | +void test_orphans(void){ | |
| 906 | + Stmt q; | |
| 907 | + int cnt = 0; | |
| 908 | + | |
| 909 | + db_find_and_open_repository(0, 0); | |
| 910 | + db_multi_exec( | |
| 911 | + "CREATE TEMP TABLE used(id INTEGER PRIMARY KEY ON CONFLICT IGNORE);" | |
| 912 | + "INSERT INTO used SELECT mid FROM mlink;" /* Manifests */ | |
| 913 | + "INSERT INTO used SELECT fid FROM mlink;" /* Files */ | |
| 914 | + "INSERT INTO used SELECT srcid FROM tagxref WHERE srcid>0;" /* Tags */ | |
| 915 | + "INSERT INTO used SELECT rid FROM tagxref;" /* Wiki & tickets */ | |
| 916 | + "INSERT INTO used SELECT rid FROM attachment JOIN blob ON src=uuid;" | |
| 917 | + "INSERT INTO used SELECT attachid FROM attachment;" | |
| 918 | + "INSERT INTO used SELECT objid FROM event;" | |
| 919 | + ); | |
| 920 | + db_prepare(&q, "SELECT rid, uuid, size FROM blob WHERE rid NOT IN used"); | |
| 921 | + while( db_step(&q)==SQLITE_ROW ){ | |
| 922 | + fossil_print("%7d %s size: %d\n", | |
| 923 | + db_column_int(&q, 0), | |
| 924 | + db_column_text(&q, 1), | |
| 925 | + db_column_int(&q,2)); | |
| 926 | + cnt++; | |
| 927 | + } | |
| 928 | + db_finalize(&q); | |
| 929 | + fossil_print("%d orphans\n", cnt); | |
| 930 | +} | |
| 899 | 931 |
| --- src/content.c | |
| +++ src/content.c | |
| @@ -894,5 +894,37 @@ | |
| 894 | } |
| 895 | db_finalize(&q); |
| 896 | fossil_print("%d non-phantom blobs (out of %d total) checked: %d errors\n", |
| 897 | n2, n1, nErr); |
| 898 | } |
| 899 |
| --- src/content.c | |
| +++ src/content.c | |
| @@ -894,5 +894,37 @@ | |
| 894 | } |
| 895 | db_finalize(&q); |
| 896 | fossil_print("%d non-phantom blobs (out of %d total) checked: %d errors\n", |
| 897 | n2, n1, nErr); |
| 898 | } |
| 899 | |
| 900 | /* |
| 901 | ** COMMAND: test-orphans |
| 902 | ** |
| 903 | ** Search the repository for orphaned artifacts |
| 904 | */ |
| 905 | void test_orphans(void){ |
| 906 | Stmt q; |
| 907 | int cnt = 0; |
| 908 | |
| 909 | db_find_and_open_repository(0, 0); |
| 910 | db_multi_exec( |
| 911 | "CREATE TEMP TABLE used(id INTEGER PRIMARY KEY ON CONFLICT IGNORE);" |
| 912 | "INSERT INTO used SELECT mid FROM mlink;" /* Manifests */ |
| 913 | "INSERT INTO used SELECT fid FROM mlink;" /* Files */ |
| 914 | "INSERT INTO used SELECT srcid FROM tagxref WHERE srcid>0;" /* Tags */ |
| 915 | "INSERT INTO used SELECT rid FROM tagxref;" /* Wiki & tickets */ |
| 916 | "INSERT INTO used SELECT rid FROM attachment JOIN blob ON src=uuid;" |
| 917 | "INSERT INTO used SELECT attachid FROM attachment;" |
| 918 | "INSERT INTO used SELECT objid FROM event;" |
| 919 | ); |
| 920 | db_prepare(&q, "SELECT rid, uuid, size FROM blob WHERE rid NOT IN used"); |
| 921 | while( db_step(&q)==SQLITE_ROW ){ |
| 922 | fossil_print("%7d %s size: %d\n", |
| 923 | db_column_int(&q, 0), |
| 924 | db_column_text(&q, 1), |
| 925 | db_column_int(&q,2)); |
| 926 | cnt++; |
| 927 | } |
| 928 | db_finalize(&q); |
| 929 | fossil_print("%d orphans\n", cnt); |
| 930 | } |
| 931 |
M
src/db.c
+2
-2
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -1609,19 +1609,19 @@ | ||
| 1609 | 1609 | |
| 1610 | 1610 | /* |
| 1611 | 1611 | ** Return true if the string zVal represents "true" (or "false"). |
| 1612 | 1612 | */ |
| 1613 | 1613 | int is_truth(const char *zVal){ |
| 1614 | - static const char *azOn[] = { "on", "yes", "true", "1" }; | |
| 1614 | + static const char *const azOn[] = { "on", "yes", "true", "1" }; | |
| 1615 | 1615 | int i; |
| 1616 | 1616 | for(i=0; i<sizeof(azOn)/sizeof(azOn[0]); i++){ |
| 1617 | 1617 | if( fossil_stricmp(zVal,azOn[i])==0 ) return 1; |
| 1618 | 1618 | } |
| 1619 | 1619 | return 0; |
| 1620 | 1620 | } |
| 1621 | 1621 | int is_false(const char *zVal){ |
| 1622 | - static const char *azOff[] = { "off", "no", "false", "0" }; | |
| 1622 | + static const char *const azOff[] = { "off", "no", "false", "0" }; | |
| 1623 | 1623 | int i; |
| 1624 | 1624 | for(i=0; i<sizeof(azOff)/sizeof(azOff[0]); i++){ |
| 1625 | 1625 | if( fossil_stricmp(zVal,azOff[i])==0 ) return 1; |
| 1626 | 1626 | } |
| 1627 | 1627 | return 0; |
| 1628 | 1628 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -1609,19 +1609,19 @@ | |
| 1609 | |
| 1610 | /* |
| 1611 | ** Return true if the string zVal represents "true" (or "false"). |
| 1612 | */ |
| 1613 | int is_truth(const char *zVal){ |
| 1614 | static const char *azOn[] = { "on", "yes", "true", "1" }; |
| 1615 | int i; |
| 1616 | for(i=0; i<sizeof(azOn)/sizeof(azOn[0]); i++){ |
| 1617 | if( fossil_stricmp(zVal,azOn[i])==0 ) return 1; |
| 1618 | } |
| 1619 | return 0; |
| 1620 | } |
| 1621 | int is_false(const char *zVal){ |
| 1622 | static const char *azOff[] = { "off", "no", "false", "0" }; |
| 1623 | int i; |
| 1624 | for(i=0; i<sizeof(azOff)/sizeof(azOff[0]); i++){ |
| 1625 | if( fossil_stricmp(zVal,azOff[i])==0 ) return 1; |
| 1626 | } |
| 1627 | return 0; |
| 1628 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -1609,19 +1609,19 @@ | |
| 1609 | |
| 1610 | /* |
| 1611 | ** Return true if the string zVal represents "true" (or "false"). |
| 1612 | */ |
| 1613 | int is_truth(const char *zVal){ |
| 1614 | static const char *const azOn[] = { "on", "yes", "true", "1" }; |
| 1615 | int i; |
| 1616 | for(i=0; i<sizeof(azOn)/sizeof(azOn[0]); i++){ |
| 1617 | if( fossil_stricmp(zVal,azOn[i])==0 ) return 1; |
| 1618 | } |
| 1619 | return 0; |
| 1620 | } |
| 1621 | int is_false(const char *zVal){ |
| 1622 | static const char *const azOff[] = { "off", "no", "false", "0" }; |
| 1623 | int i; |
| 1624 | for(i=0; i<sizeof(azOff)/sizeof(azOff[0]); i++){ |
| 1625 | if( fossil_stricmp(zVal,azOff[i])==0 ) return 1; |
| 1626 | } |
| 1627 | return 0; |
| 1628 |
+9
-5
| --- src/name.c | ||
| +++ src/name.c | ||
| @@ -253,15 +253,19 @@ | ||
| 253 | 253 | if( rid>0 ) return rid; |
| 254 | 254 | |
| 255 | 255 | /* Undocumented: numeric tags get translated directly into the RID */ |
| 256 | 256 | for(i=0; fossil_isdigit(zTag[i]); i++){} |
| 257 | 257 | if( zTag[i]==0 ){ |
| 258 | - rid = db_int(0, | |
| 259 | - "SELECT event.objid" | |
| 260 | - " FROM event" | |
| 261 | - " WHERE event.objid=%s" | |
| 262 | - " AND event.type GLOB '%q'", zTag, zType); | |
| 258 | + if( strcmp(zType,"*")==0 ){ | |
| 259 | + rid = atoi(zTag); | |
| 260 | + }else{ | |
| 261 | + rid = db_int(0, | |
| 262 | + "SELECT event.objid" | |
| 263 | + " FROM event" | |
| 264 | + " WHERE event.objid=%s" | |
| 265 | + " AND event.type GLOB '%q'", zTag, zType); | |
| 266 | + } | |
| 263 | 267 | } |
| 264 | 268 | return rid; |
| 265 | 269 | } |
| 266 | 270 | |
| 267 | 271 | |
| 268 | 272 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -253,15 +253,19 @@ | |
| 253 | if( rid>0 ) return rid; |
| 254 | |
| 255 | /* Undocumented: numeric tags get translated directly into the RID */ |
| 256 | for(i=0; fossil_isdigit(zTag[i]); i++){} |
| 257 | if( zTag[i]==0 ){ |
| 258 | rid = db_int(0, |
| 259 | "SELECT event.objid" |
| 260 | " FROM event" |
| 261 | " WHERE event.objid=%s" |
| 262 | " AND event.type GLOB '%q'", zTag, zType); |
| 263 | } |
| 264 | return rid; |
| 265 | } |
| 266 | |
| 267 | |
| 268 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -253,15 +253,19 @@ | |
| 253 | if( rid>0 ) return rid; |
| 254 | |
| 255 | /* Undocumented: numeric tags get translated directly into the RID */ |
| 256 | for(i=0; fossil_isdigit(zTag[i]); i++){} |
| 257 | if( zTag[i]==0 ){ |
| 258 | if( strcmp(zType,"*")==0 ){ |
| 259 | rid = atoi(zTag); |
| 260 | }else{ |
| 261 | rid = db_int(0, |
| 262 | "SELECT event.objid" |
| 263 | " FROM event" |
| 264 | " WHERE event.objid=%s" |
| 265 | " AND event.type GLOB '%q'", zTag, zType); |
| 266 | } |
| 267 | } |
| 268 | return rid; |
| 269 | } |
| 270 | |
| 271 | |
| 272 |
+1
-1
| --- src/report.c | ||
| +++ src/report.c | ||
| @@ -170,11 +170,11 @@ | ||
| 170 | 170 | case SQLITE_SELECT: |
| 171 | 171 | case SQLITE_FUNCTION: { |
| 172 | 172 | break; |
| 173 | 173 | } |
| 174 | 174 | case SQLITE_READ: { |
| 175 | - static const char *azAllowed[] = { | |
| 175 | + static const char *const azAllowed[] = { | |
| 176 | 176 | "ticket", |
| 177 | 177 | "blob", |
| 178 | 178 | "filename", |
| 179 | 179 | "mlink", |
| 180 | 180 | "plink", |
| 181 | 181 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -170,11 +170,11 @@ | |
| 170 | case SQLITE_SELECT: |
| 171 | case SQLITE_FUNCTION: { |
| 172 | break; |
| 173 | } |
| 174 | case SQLITE_READ: { |
| 175 | static const char *azAllowed[] = { |
| 176 | "ticket", |
| 177 | "blob", |
| 178 | "filename", |
| 179 | "mlink", |
| 180 | "plink", |
| 181 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -170,11 +170,11 @@ | |
| 170 | case SQLITE_SELECT: |
| 171 | case SQLITE_FUNCTION: { |
| 172 | break; |
| 173 | } |
| 174 | case SQLITE_READ: { |
| 175 | static const char *const azAllowed[] = { |
| 176 | "ticket", |
| 177 | "blob", |
| 178 | "filename", |
| 179 | "mlink", |
| 180 | "plink", |
| 181 |
+6
| --- src/tkt.c | ||
| +++ src/tkt.c | ||
| @@ -433,10 +433,11 @@ | ||
| 433 | 433 | ){ |
| 434 | 434 | char *zDate; |
| 435 | 435 | const char *zUuid; |
| 436 | 436 | int i; |
| 437 | 437 | int rid; |
| 438 | + int nJ = 0; | |
| 438 | 439 | Blob tktchng, cksum; |
| 439 | 440 | |
| 440 | 441 | login_verify_csrf_secret(); |
| 441 | 442 | zUuid = (const char *)pUuid; |
| 442 | 443 | blob_zero(&tktchng); |
| @@ -461,10 +462,11 @@ | ||
| 461 | 462 | zValue = db_conceal(zValue, nValue); |
| 462 | 463 | blob_appendf(&tktchng, "J %s %s\n", azField[i], zValue); |
| 463 | 464 | }else{ |
| 464 | 465 | blob_appendf(&tktchng, "J %s %#F\n", azField[i], nValue, zValue); |
| 465 | 466 | } |
| 467 | + nJ++; | |
| 466 | 468 | } |
| 467 | 469 | } |
| 468 | 470 | } |
| 469 | 471 | if( *(char**)pUuid ){ |
| 470 | 472 | zUuid = db_text(0, |
| @@ -476,10 +478,14 @@ | ||
| 476 | 478 | *(const char**)pUuid = zUuid; |
| 477 | 479 | blob_appendf(&tktchng, "K %s\n", zUuid); |
| 478 | 480 | blob_appendf(&tktchng, "U %F\n", g.zLogin ? g.zLogin : ""); |
| 479 | 481 | md5sum_blob(&tktchng, &cksum); |
| 480 | 482 | blob_appendf(&tktchng, "Z %b\n", &cksum); |
| 483 | + if( nJ==0 ){ | |
| 484 | + blob_reset(&tktchng); | |
| 485 | + return TH_OK; | |
| 486 | + } | |
| 481 | 487 | if( g.zPath[0]=='d' ){ |
| 482 | 488 | /* If called from /debug_tktnew or /debug_tktedit... */ |
| 483 | 489 | @ <font color="blue"> |
| 484 | 490 | @ <p>Ticket artifact that would have been submitted:</p> |
| 485 | 491 | @ <blockquote><pre>%h(blob_str(&tktchng))</pre></blockquote> |
| 486 | 492 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -433,10 +433,11 @@ | |
| 433 | ){ |
| 434 | char *zDate; |
| 435 | const char *zUuid; |
| 436 | int i; |
| 437 | int rid; |
| 438 | Blob tktchng, cksum; |
| 439 | |
| 440 | login_verify_csrf_secret(); |
| 441 | zUuid = (const char *)pUuid; |
| 442 | blob_zero(&tktchng); |
| @@ -461,10 +462,11 @@ | |
| 461 | zValue = db_conceal(zValue, nValue); |
| 462 | blob_appendf(&tktchng, "J %s %s\n", azField[i], zValue); |
| 463 | }else{ |
| 464 | blob_appendf(&tktchng, "J %s %#F\n", azField[i], nValue, zValue); |
| 465 | } |
| 466 | } |
| 467 | } |
| 468 | } |
| 469 | if( *(char**)pUuid ){ |
| 470 | zUuid = db_text(0, |
| @@ -476,10 +478,14 @@ | |
| 476 | *(const char**)pUuid = zUuid; |
| 477 | blob_appendf(&tktchng, "K %s\n", zUuid); |
| 478 | blob_appendf(&tktchng, "U %F\n", g.zLogin ? g.zLogin : ""); |
| 479 | md5sum_blob(&tktchng, &cksum); |
| 480 | blob_appendf(&tktchng, "Z %b\n", &cksum); |
| 481 | if( g.zPath[0]=='d' ){ |
| 482 | /* If called from /debug_tktnew or /debug_tktedit... */ |
| 483 | @ <font color="blue"> |
| 484 | @ <p>Ticket artifact that would have been submitted:</p> |
| 485 | @ <blockquote><pre>%h(blob_str(&tktchng))</pre></blockquote> |
| 486 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -433,10 +433,11 @@ | |
| 433 | ){ |
| 434 | char *zDate; |
| 435 | const char *zUuid; |
| 436 | int i; |
| 437 | int rid; |
| 438 | int nJ = 0; |
| 439 | Blob tktchng, cksum; |
| 440 | |
| 441 | login_verify_csrf_secret(); |
| 442 | zUuid = (const char *)pUuid; |
| 443 | blob_zero(&tktchng); |
| @@ -461,10 +462,11 @@ | |
| 462 | zValue = db_conceal(zValue, nValue); |
| 463 | blob_appendf(&tktchng, "J %s %s\n", azField[i], zValue); |
| 464 | }else{ |
| 465 | blob_appendf(&tktchng, "J %s %#F\n", azField[i], nValue, zValue); |
| 466 | } |
| 467 | nJ++; |
| 468 | } |
| 469 | } |
| 470 | } |
| 471 | if( *(char**)pUuid ){ |
| 472 | zUuid = db_text(0, |
| @@ -476,10 +478,14 @@ | |
| 478 | *(const char**)pUuid = zUuid; |
| 479 | blob_appendf(&tktchng, "K %s\n", zUuid); |
| 480 | blob_appendf(&tktchng, "U %F\n", g.zLogin ? g.zLogin : ""); |
| 481 | md5sum_blob(&tktchng, &cksum); |
| 482 | blob_appendf(&tktchng, "Z %b\n", &cksum); |
| 483 | if( nJ==0 ){ |
| 484 | blob_reset(&tktchng); |
| 485 | return TH_OK; |
| 486 | } |
| 487 | if( g.zPath[0]=='d' ){ |
| 488 | /* If called from /debug_tktnew or /debug_tktedit... */ |
| 489 | @ <font color="blue"> |
| 490 | @ <p>Ticket artifact that would have been submitted:</p> |
| 491 | @ <blockquote><pre>%h(blob_str(&tktchng))</pre></blockquote> |
| 492 |
+1
-1
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -270,11 +270,11 @@ | ||
| 270 | 270 | int rid, /* record id of the file to send */ |
| 271 | 271 | int isPrivate, /* True if rid is a private artifact */ |
| 272 | 272 | Blob *pContent, /* The content of the file to send */ |
| 273 | 273 | Blob *pUuid /* The UUID of the file to send */ |
| 274 | 274 | ){ |
| 275 | - static const char *azQuery[] = { | |
| 275 | + static const char *const azQuery[] = { | |
| 276 | 276 | "SELECT pid FROM plink x" |
| 277 | 277 | " WHERE cid=%d" |
| 278 | 278 | " AND NOT EXISTS(SELECT 1 FROM phantom WHERE rid=pid)" |
| 279 | 279 | " AND NOT EXISTS(SELECT 1 FROM plink y" |
| 280 | 280 | " WHERE y.pid=x.cid AND y.cid=x.pid)", |
| 281 | 281 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -270,11 +270,11 @@ | |
| 270 | int rid, /* record id of the file to send */ |
| 271 | int isPrivate, /* True if rid is a private artifact */ |
| 272 | Blob *pContent, /* The content of the file to send */ |
| 273 | Blob *pUuid /* The UUID of the file to send */ |
| 274 | ){ |
| 275 | static const char *azQuery[] = { |
| 276 | "SELECT pid FROM plink x" |
| 277 | " WHERE cid=%d" |
| 278 | " AND NOT EXISTS(SELECT 1 FROM phantom WHERE rid=pid)" |
| 279 | " AND NOT EXISTS(SELECT 1 FROM plink y" |
| 280 | " WHERE y.pid=x.cid AND y.cid=x.pid)", |
| 281 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -270,11 +270,11 @@ | |
| 270 | int rid, /* record id of the file to send */ |
| 271 | int isPrivate, /* True if rid is a private artifact */ |
| 272 | Blob *pContent, /* The content of the file to send */ |
| 273 | Blob *pUuid /* The UUID of the file to send */ |
| 274 | ){ |
| 275 | static const char *const azQuery[] = { |
| 276 | "SELECT pid FROM plink x" |
| 277 | " WHERE cid=%d" |
| 278 | " AND NOT EXISTS(SELECT 1 FROM phantom WHERE rid=pid)" |
| 279 | " AND NOT EXISTS(SELECT 1 FROM plink y" |
| 280 | " WHERE y.pid=x.cid AND y.cid=x.pid)", |
| 281 |