Fossil SCM

The check for whether to continue during sync due to outstanding "uvgimme" requests was being skipped in clone -u mode due to misordered tests at the end of the client side of the sync protocol.

wyoung 2022-10-27 17:56 trunk
Commit 52648d03847bd0ed24d266e111146a7efdd302b7f397d7683fef79dcc34b669e
1 file changed +4 -4
+4 -4
--- src/xfer.c
+++ src/xfer.c
@@ -2812,10 +2812,14 @@
28122812
}else if( xfer.nFileSent+xfer.nDeltaSent>0 || uvDoPush ){
28132813
/* Go another round if files are queued to send */
28142814
go = 1;
28152815
}else if( xfer.nPrivIGot>0 && nCycle==1 ){
28162816
go = 1;
2817
+ }else if( nUvGimmeSent>0 && (nUvFileRcvd>0 || nCycle<3) ){
2818
+ /* Continue looping as long as new uvfile cards are being received
2819
+ ** and uvgimme cards are being sent. */
2820
+ go = 1;
28172821
}else if( (syncFlags & SYNC_CLONE)!=0 ){
28182822
if( nCycle==1 ){
28192823
go = 1; /* go at least two rounds on a clone */
28202824
}else if( nFileRecv>0 ){
28212825
go = 1;
@@ -2822,14 +2826,10 @@
28222826
}else if( cloneSeqno>0 && nArtifactRcvd>nPriorArtifact ){
28232827
/* Continue the clone until we see the clone_seqno 0" card or
28242828
** until we stop receiving artifacts */
28252829
go = 1;
28262830
}
2827
- }else if( nUvGimmeSent>0 && (nUvFileRcvd>0 || nCycle<3) ){
2828
- /* Continue looping as long as new uvfile cards are being received
2829
- ** and uvgimme cards are being sent. */
2830
- go = 1;
28312831
}
28322832
28332833
nCardRcvd = 0;
28342834
xfer.nFileRcvd = 0;
28352835
xfer.nDeltaRcvd = 0;
28362836
--- src/xfer.c
+++ src/xfer.c
@@ -2812,10 +2812,14 @@
2812 }else if( xfer.nFileSent+xfer.nDeltaSent>0 || uvDoPush ){
2813 /* Go another round if files are queued to send */
2814 go = 1;
2815 }else if( xfer.nPrivIGot>0 && nCycle==1 ){
2816 go = 1;
 
 
 
 
2817 }else if( (syncFlags & SYNC_CLONE)!=0 ){
2818 if( nCycle==1 ){
2819 go = 1; /* go at least two rounds on a clone */
2820 }else if( nFileRecv>0 ){
2821 go = 1;
@@ -2822,14 +2826,10 @@
2822 }else if( cloneSeqno>0 && nArtifactRcvd>nPriorArtifact ){
2823 /* Continue the clone until we see the clone_seqno 0" card or
2824 ** until we stop receiving artifacts */
2825 go = 1;
2826 }
2827 }else if( nUvGimmeSent>0 && (nUvFileRcvd>0 || nCycle<3) ){
2828 /* Continue looping as long as new uvfile cards are being received
2829 ** and uvgimme cards are being sent. */
2830 go = 1;
2831 }
2832
2833 nCardRcvd = 0;
2834 xfer.nFileRcvd = 0;
2835 xfer.nDeltaRcvd = 0;
2836
--- src/xfer.c
+++ src/xfer.c
@@ -2812,10 +2812,14 @@
2812 }else if( xfer.nFileSent+xfer.nDeltaSent>0 || uvDoPush ){
2813 /* Go another round if files are queued to send */
2814 go = 1;
2815 }else if( xfer.nPrivIGot>0 && nCycle==1 ){
2816 go = 1;
2817 }else if( nUvGimmeSent>0 && (nUvFileRcvd>0 || nCycle<3) ){
2818 /* Continue looping as long as new uvfile cards are being received
2819 ** and uvgimme cards are being sent. */
2820 go = 1;
2821 }else if( (syncFlags & SYNC_CLONE)!=0 ){
2822 if( nCycle==1 ){
2823 go = 1; /* go at least two rounds on a clone */
2824 }else if( nFileRecv>0 ){
2825 go = 1;
@@ -2822,14 +2826,10 @@
2826 }else if( cloneSeqno>0 && nArtifactRcvd>nPriorArtifact ){
2827 /* Continue the clone until we see the clone_seqno 0" card or
2828 ** until we stop receiving artifacts */
2829 go = 1;
2830 }
 
 
 
 
2831 }
2832
2833 nCardRcvd = 0;
2834 xfer.nFileRcvd = 0;
2835 xfer.nDeltaRcvd = 0;
2836

Keyboard Shortcuts

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