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.
Commit
52648d03847bd0ed24d266e111146a7efdd302b7f397d7683fef79dcc34b669e
Parent
cdd58b1fbfa62e9…
1 file changed
+4
-4
+4
-4
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -2812,10 +2812,14 @@ | ||
| 2812 | 2812 | }else if( xfer.nFileSent+xfer.nDeltaSent>0 || uvDoPush ){ |
| 2813 | 2813 | /* Go another round if files are queued to send */ |
| 2814 | 2814 | go = 1; |
| 2815 | 2815 | }else if( xfer.nPrivIGot>0 && nCycle==1 ){ |
| 2816 | 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; | |
| 2817 | 2821 | }else if( (syncFlags & SYNC_CLONE)!=0 ){ |
| 2818 | 2822 | if( nCycle==1 ){ |
| 2819 | 2823 | go = 1; /* go at least two rounds on a clone */ |
| 2820 | 2824 | }else if( nFileRecv>0 ){ |
| 2821 | 2825 | go = 1; |
| @@ -2822,14 +2826,10 @@ | ||
| 2822 | 2826 | }else if( cloneSeqno>0 && nArtifactRcvd>nPriorArtifact ){ |
| 2823 | 2827 | /* Continue the clone until we see the clone_seqno 0" card or |
| 2824 | 2828 | ** until we stop receiving artifacts */ |
| 2825 | 2829 | go = 1; |
| 2826 | 2830 | } |
| 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 | 2831 | } |
| 2832 | 2832 | |
| 2833 | 2833 | nCardRcvd = 0; |
| 2834 | 2834 | xfer.nFileRcvd = 0; |
| 2835 | 2835 | xfer.nDeltaRcvd = 0; |
| 2836 | 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( (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 |