Fossil SCM

Defer output of stats until the transport has been opened. This will also help with HTTPs when using client peer certificates (or unrecognized CAs).

andybradford 2013-08-03 03:09 ssh-shared-account
Commit d1771cd1388f96801c1ea07235c5ee8459f50c55
1 file changed +12 -9
+12 -9
--- src/xfer.c
+++ src/xfer.c
@@ -1465,11 +1465,22 @@
14651465
*/
14661466
zRandomness = db_text(0, "SELECT hex(randomblob(20))");
14671467
blob_appendf(&send, "# %s\n", zRandomness);
14681468
free(zRandomness);
14691469
1470
+ if( syncFlags & SYNC_VERBOSE ){
1471
+ fossil_print("waiting for server...");
1472
+ }
1473
+ fflush(stdout);
14701474
/* Exchange messages with the server */
1475
+ if( http_exchange(&send, &recv, (syncFlags & SYNC_CLONE)==0 || nCycle>0,
1476
+ MAX_REDIRECTS) ){
1477
+ nErr++;
1478
+ break;
1479
+ }
1480
+
1481
+ /* Output current stats */
14711482
if( syncFlags & SYNC_VERBOSE ){
14721483
fossil_print(zValueFormat, "Sent:",
14731484
blob_size(&send), nCardSent+xfer.nGimmeSent+xfer.nIGotSent,
14741485
xfer.nFileSent, xfer.nDeltaSent);
14751486
}else{
@@ -1481,19 +1492,11 @@
14811492
nCardRcvd = 0;
14821493
xfer.nFileSent = 0;
14831494
xfer.nDeltaSent = 0;
14841495
xfer.nGimmeSent = 0;
14851496
xfer.nIGotSent = 0;
1486
- if( syncFlags & SYNC_VERBOSE ){
1487
- fossil_print("waiting for server...");
1488
- }
1489
- fflush(stdout);
1490
- if( http_exchange(&send, &recv, (syncFlags & SYNC_CLONE)==0 || nCycle>0,
1491
- MAX_REDIRECTS) ){
1492
- nErr++;
1493
- break;
1494
- }
1497
+
14951498
lastPctDone = -1;
14961499
blob_reset(&send);
14971500
rArrivalTime = db_double(0.0, "SELECT julianday('now')");
14981501
14991502
/* Send the send-private pragma if we are trying to sync private data */
15001503
--- src/xfer.c
+++ src/xfer.c
@@ -1465,11 +1465,22 @@
1465 */
1466 zRandomness = db_text(0, "SELECT hex(randomblob(20))");
1467 blob_appendf(&send, "# %s\n", zRandomness);
1468 free(zRandomness);
1469
 
 
 
 
1470 /* Exchange messages with the server */
 
 
 
 
 
 
 
1471 if( syncFlags & SYNC_VERBOSE ){
1472 fossil_print(zValueFormat, "Sent:",
1473 blob_size(&send), nCardSent+xfer.nGimmeSent+xfer.nIGotSent,
1474 xfer.nFileSent, xfer.nDeltaSent);
1475 }else{
@@ -1481,19 +1492,11 @@
1481 nCardRcvd = 0;
1482 xfer.nFileSent = 0;
1483 xfer.nDeltaSent = 0;
1484 xfer.nGimmeSent = 0;
1485 xfer.nIGotSent = 0;
1486 if( syncFlags & SYNC_VERBOSE ){
1487 fossil_print("waiting for server...");
1488 }
1489 fflush(stdout);
1490 if( http_exchange(&send, &recv, (syncFlags & SYNC_CLONE)==0 || nCycle>0,
1491 MAX_REDIRECTS) ){
1492 nErr++;
1493 break;
1494 }
1495 lastPctDone = -1;
1496 blob_reset(&send);
1497 rArrivalTime = db_double(0.0, "SELECT julianday('now')");
1498
1499 /* Send the send-private pragma if we are trying to sync private data */
1500
--- src/xfer.c
+++ src/xfer.c
@@ -1465,11 +1465,22 @@
1465 */
1466 zRandomness = db_text(0, "SELECT hex(randomblob(20))");
1467 blob_appendf(&send, "# %s\n", zRandomness);
1468 free(zRandomness);
1469
1470 if( syncFlags & SYNC_VERBOSE ){
1471 fossil_print("waiting for server...");
1472 }
1473 fflush(stdout);
1474 /* Exchange messages with the server */
1475 if( http_exchange(&send, &recv, (syncFlags & SYNC_CLONE)==0 || nCycle>0,
1476 MAX_REDIRECTS) ){
1477 nErr++;
1478 break;
1479 }
1480
1481 /* Output current stats */
1482 if( syncFlags & SYNC_VERBOSE ){
1483 fossil_print(zValueFormat, "Sent:",
1484 blob_size(&send), nCardSent+xfer.nGimmeSent+xfer.nIGotSent,
1485 xfer.nFileSent, xfer.nDeltaSent);
1486 }else{
@@ -1481,19 +1492,11 @@
1492 nCardRcvd = 0;
1493 xfer.nFileSent = 0;
1494 xfer.nDeltaSent = 0;
1495 xfer.nGimmeSent = 0;
1496 xfer.nIGotSent = 0;
1497
 
 
 
 
 
 
 
 
1498 lastPctDone = -1;
1499 blob_reset(&send);
1500 rArrivalTime = db_double(0.0, "SELECT julianday('now')");
1501
1502 /* Send the send-private pragma if we are trying to sync private data */
1503

Keyboard Shortcuts

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