Fossil SCM
Merged in trunk [ae64088627df]. Added /json/timeline/checkin as alias for /json/timeline/commit (checkin is historically more correct/consistent).
Commit
a9070a49445b788960928532d2f7016f955995d5
Parent
94689bbf29c1ab6…
5 files changed
+3
-3
+1
+1
+2
-1
+2
-1
+3
-3
| --- src/http_socket.c | ||
| +++ src/http_socket.c | ||
| @@ -200,16 +200,16 @@ | ||
| 200 | 200 | |
| 201 | 201 | /* |
| 202 | 202 | ** Receive content back from the open socket connection. |
| 203 | 203 | */ |
| 204 | 204 | size_t socket_receive(void *NotUsed, void *pContent, size_t N){ |
| 205 | - size_t got; | |
| 205 | + ssize_t got; | |
| 206 | 206 | size_t total = 0; |
| 207 | 207 | while( N>0 ){ |
| 208 | 208 | got = recv(iSocket, pContent, N, 0); |
| 209 | 209 | if( got<=0 ) break; |
| 210 | - total += got; | |
| 211 | - N -= got; | |
| 210 | + total += (size_t)got; | |
| 211 | + N -= (size_t)got; | |
| 212 | 212 | pContent = (void*)&((char*)pContent)[got]; |
| 213 | 213 | } |
| 214 | 214 | return total; |
| 215 | 215 | } |
| 216 | 216 |
| --- src/http_socket.c | |
| +++ src/http_socket.c | |
| @@ -200,16 +200,16 @@ | |
| 200 | |
| 201 | /* |
| 202 | ** Receive content back from the open socket connection. |
| 203 | */ |
| 204 | size_t socket_receive(void *NotUsed, void *pContent, size_t N){ |
| 205 | size_t got; |
| 206 | size_t total = 0; |
| 207 | while( N>0 ){ |
| 208 | got = recv(iSocket, pContent, N, 0); |
| 209 | if( got<=0 ) break; |
| 210 | total += got; |
| 211 | N -= got; |
| 212 | pContent = (void*)&((char*)pContent)[got]; |
| 213 | } |
| 214 | return total; |
| 215 | } |
| 216 |
| --- src/http_socket.c | |
| +++ src/http_socket.c | |
| @@ -200,16 +200,16 @@ | |
| 200 | |
| 201 | /* |
| 202 | ** Receive content back from the open socket connection. |
| 203 | */ |
| 204 | size_t socket_receive(void *NotUsed, void *pContent, size_t N){ |
| 205 | ssize_t got; |
| 206 | size_t total = 0; |
| 207 | while( N>0 ){ |
| 208 | got = recv(iSocket, pContent, N, 0); |
| 209 | if( got<=0 ) break; |
| 210 | total += (size_t)got; |
| 211 | N -= (size_t)got; |
| 212 | pContent = (void*)&((char*)pContent)[got]; |
| 213 | } |
| 214 | return total; |
| 215 | } |
| 216 |
+1
| --- src/json_timeline.c | ||
| +++ src/json_timeline.c | ||
| @@ -28,10 +28,11 @@ | ||
| 28 | 28 | /* |
| 29 | 29 | ** Mapping of /json/timeline/XXX commands/paths to callbacks. |
| 30 | 30 | */ |
| 31 | 31 | static const JsonPageDef JsonPageDefs_Timeline[] = { |
| 32 | 32 | {"c", json_timeline_ci, 0}, |
| 33 | +{"checkin", json_timeline_ci, 0}, | |
| 33 | 34 | {"ci", json_timeline_ci, 0}, |
| 34 | 35 | {"com", json_timeline_ci, 0}, |
| 35 | 36 | {"commit", json_timeline_ci, 0}, |
| 36 | 37 | {"t", json_timeline_ticket, 0}, |
| 37 | 38 | {"ticket", json_timeline_ticket, 0}, |
| 38 | 39 |
| --- src/json_timeline.c | |
| +++ src/json_timeline.c | |
| @@ -28,10 +28,11 @@ | |
| 28 | /* |
| 29 | ** Mapping of /json/timeline/XXX commands/paths to callbacks. |
| 30 | */ |
| 31 | static const JsonPageDef JsonPageDefs_Timeline[] = { |
| 32 | {"c", json_timeline_ci, 0}, |
| 33 | {"ci", json_timeline_ci, 0}, |
| 34 | {"com", json_timeline_ci, 0}, |
| 35 | {"commit", json_timeline_ci, 0}, |
| 36 | {"t", json_timeline_ticket, 0}, |
| 37 | {"ticket", json_timeline_ticket, 0}, |
| 38 |
| --- src/json_timeline.c | |
| +++ src/json_timeline.c | |
| @@ -28,10 +28,11 @@ | |
| 28 | /* |
| 29 | ** Mapping of /json/timeline/XXX commands/paths to callbacks. |
| 30 | */ |
| 31 | static const JsonPageDef JsonPageDefs_Timeline[] = { |
| 32 | {"c", json_timeline_ci, 0}, |
| 33 | {"checkin", json_timeline_ci, 0}, |
| 34 | {"ci", json_timeline_ci, 0}, |
| 35 | {"com", json_timeline_ci, 0}, |
| 36 | {"commit", json_timeline_ci, 0}, |
| 37 | {"t", json_timeline_ticket, 0}, |
| 38 | {"ticket", json_timeline_ticket, 0}, |
| 39 |
+1
| --- src/json_timeline.c | ||
| +++ src/json_timeline.c | ||
| @@ -28,10 +28,11 @@ | ||
| 28 | 28 | /* |
| 29 | 29 | ** Mapping of /json/timeline/XXX commands/paths to callbacks. |
| 30 | 30 | */ |
| 31 | 31 | static const JsonPageDef JsonPageDefs_Timeline[] = { |
| 32 | 32 | {"c", json_timeline_ci, 0}, |
| 33 | +{"checkin", json_timeline_ci, 0}, | |
| 33 | 34 | {"ci", json_timeline_ci, 0}, |
| 34 | 35 | {"com", json_timeline_ci, 0}, |
| 35 | 36 | {"commit", json_timeline_ci, 0}, |
| 36 | 37 | {"t", json_timeline_ticket, 0}, |
| 37 | 38 | {"ticket", json_timeline_ticket, 0}, |
| 38 | 39 |
| --- src/json_timeline.c | |
| +++ src/json_timeline.c | |
| @@ -28,10 +28,11 @@ | |
| 28 | /* |
| 29 | ** Mapping of /json/timeline/XXX commands/paths to callbacks. |
| 30 | */ |
| 31 | static const JsonPageDef JsonPageDefs_Timeline[] = { |
| 32 | {"c", json_timeline_ci, 0}, |
| 33 | {"ci", json_timeline_ci, 0}, |
| 34 | {"com", json_timeline_ci, 0}, |
| 35 | {"commit", json_timeline_ci, 0}, |
| 36 | {"t", json_timeline_ticket, 0}, |
| 37 | {"ticket", json_timeline_ticket, 0}, |
| 38 |
| --- src/json_timeline.c | |
| +++ src/json_timeline.c | |
| @@ -28,10 +28,11 @@ | |
| 28 | /* |
| 29 | ** Mapping of /json/timeline/XXX commands/paths to callbacks. |
| 30 | */ |
| 31 | static const JsonPageDef JsonPageDefs_Timeline[] = { |
| 32 | {"c", json_timeline_ci, 0}, |
| 33 | {"checkin", json_timeline_ci, 0}, |
| 34 | {"ci", json_timeline_ci, 0}, |
| 35 | {"com", json_timeline_ci, 0}, |
| 36 | {"commit", json_timeline_ci, 0}, |
| 37 | {"t", json_timeline_ticket, 0}, |
| 38 | {"ticket", json_timeline_ticket, 0}, |
| 39 |
+2
-1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -270,11 +270,11 @@ | ||
| 270 | 270 | upr = mid - 1; |
| 271 | 271 | }else{ |
| 272 | 272 | lwr = mid + 1; |
| 273 | 273 | } |
| 274 | 274 | } |
| 275 | - for(m=cnt=0, i=upr-2; i<=upr+3 && i<nMap; i++){ | |
| 275 | + for(m=cnt=0, i=upr-2; cnt<2 && i<=upr+3 && i<nMap; i++){ | |
| 276 | 276 | if( i<0 ) continue; |
| 277 | 277 | if( strncmp(zName, aMap[i].zName, n)==0 ){ |
| 278 | 278 | m = i; |
| 279 | 279 | cnt++; |
| 280 | 280 | } |
| @@ -467,10 +467,11 @@ | ||
| 467 | 467 | cgi_reply(); |
| 468 | 468 | }else{ |
| 469 | 469 | char *zOut = mprintf("\r%s: %s\n", fossil_nameofexe(), z); |
| 470 | 470 | fossil_puts(zOut, 1); |
| 471 | 471 | } |
| 472 | + free(z); | |
| 472 | 473 | db_force_rollback(); |
| 473 | 474 | fossil_exit(rc); |
| 474 | 475 | } |
| 475 | 476 | |
| 476 | 477 | /* This routine works like fossil_fatal() except that if called |
| 477 | 478 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -270,11 +270,11 @@ | |
| 270 | upr = mid - 1; |
| 271 | }else{ |
| 272 | lwr = mid + 1; |
| 273 | } |
| 274 | } |
| 275 | for(m=cnt=0, i=upr-2; i<=upr+3 && i<nMap; i++){ |
| 276 | if( i<0 ) continue; |
| 277 | if( strncmp(zName, aMap[i].zName, n)==0 ){ |
| 278 | m = i; |
| 279 | cnt++; |
| 280 | } |
| @@ -467,10 +467,11 @@ | |
| 467 | cgi_reply(); |
| 468 | }else{ |
| 469 | char *zOut = mprintf("\r%s: %s\n", fossil_nameofexe(), z); |
| 470 | fossil_puts(zOut, 1); |
| 471 | } |
| 472 | db_force_rollback(); |
| 473 | fossil_exit(rc); |
| 474 | } |
| 475 | |
| 476 | /* This routine works like fossil_fatal() except that if called |
| 477 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -270,11 +270,11 @@ | |
| 270 | upr = mid - 1; |
| 271 | }else{ |
| 272 | lwr = mid + 1; |
| 273 | } |
| 274 | } |
| 275 | for(m=cnt=0, i=upr-2; cnt<2 && i<=upr+3 && i<nMap; i++){ |
| 276 | if( i<0 ) continue; |
| 277 | if( strncmp(zName, aMap[i].zName, n)==0 ){ |
| 278 | m = i; |
| 279 | cnt++; |
| 280 | } |
| @@ -467,10 +467,11 @@ | |
| 467 | cgi_reply(); |
| 468 | }else{ |
| 469 | char *zOut = mprintf("\r%s: %s\n", fossil_nameofexe(), z); |
| 470 | fossil_puts(zOut, 1); |
| 471 | } |
| 472 | free(z); |
| 473 | db_force_rollback(); |
| 474 | fossil_exit(rc); |
| 475 | } |
| 476 | |
| 477 | /* This routine works like fossil_fatal() except that if called |
| 478 |
+2
-1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -270,11 +270,11 @@ | ||
| 270 | 270 | upr = mid - 1; |
| 271 | 271 | }else{ |
| 272 | 272 | lwr = mid + 1; |
| 273 | 273 | } |
| 274 | 274 | } |
| 275 | - for(m=cnt=0, i=upr-2; i<=upr+3 && i<nMap; i++){ | |
| 275 | + for(m=cnt=0, i=upr-2; cnt<2 && i<=upr+3 && i<nMap; i++){ | |
| 276 | 276 | if( i<0 ) continue; |
| 277 | 277 | if( strncmp(zName, aMap[i].zName, n)==0 ){ |
| 278 | 278 | m = i; |
| 279 | 279 | cnt++; |
| 280 | 280 | } |
| @@ -467,10 +467,11 @@ | ||
| 467 | 467 | cgi_reply(); |
| 468 | 468 | }else{ |
| 469 | 469 | char *zOut = mprintf("\r%s: %s\n", fossil_nameofexe(), z); |
| 470 | 470 | fossil_puts(zOut, 1); |
| 471 | 471 | } |
| 472 | + free(z); | |
| 472 | 473 | db_force_rollback(); |
| 473 | 474 | fossil_exit(rc); |
| 474 | 475 | } |
| 475 | 476 | |
| 476 | 477 | /* This routine works like fossil_fatal() except that if called |
| 477 | 478 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -270,11 +270,11 @@ | |
| 270 | upr = mid - 1; |
| 271 | }else{ |
| 272 | lwr = mid + 1; |
| 273 | } |
| 274 | } |
| 275 | for(m=cnt=0, i=upr-2; i<=upr+3 && i<nMap; i++){ |
| 276 | if( i<0 ) continue; |
| 277 | if( strncmp(zName, aMap[i].zName, n)==0 ){ |
| 278 | m = i; |
| 279 | cnt++; |
| 280 | } |
| @@ -467,10 +467,11 @@ | |
| 467 | cgi_reply(); |
| 468 | }else{ |
| 469 | char *zOut = mprintf("\r%s: %s\n", fossil_nameofexe(), z); |
| 470 | fossil_puts(zOut, 1); |
| 471 | } |
| 472 | db_force_rollback(); |
| 473 | fossil_exit(rc); |
| 474 | } |
| 475 | |
| 476 | /* This routine works like fossil_fatal() except that if called |
| 477 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -270,11 +270,11 @@ | |
| 270 | upr = mid - 1; |
| 271 | }else{ |
| 272 | lwr = mid + 1; |
| 273 | } |
| 274 | } |
| 275 | for(m=cnt=0, i=upr-2; cnt<2 && i<=upr+3 && i<nMap; i++){ |
| 276 | if( i<0 ) continue; |
| 277 | if( strncmp(zName, aMap[i].zName, n)==0 ){ |
| 278 | m = i; |
| 279 | cnt++; |
| 280 | } |
| @@ -467,10 +467,11 @@ | |
| 467 | cgi_reply(); |
| 468 | }else{ |
| 469 | char *zOut = mprintf("\r%s: %s\n", fossil_nameofexe(), z); |
| 470 | fossil_puts(zOut, 1); |
| 471 | } |
| 472 | free(z); |
| 473 | db_force_rollback(); |
| 474 | fossil_exit(rc); |
| 475 | } |
| 476 | |
| 477 | /* This routine works like fossil_fatal() except that if called |
| 478 |