Fossil SCM

Fix an off-by-one error in the version-3 clone protocol. This error might cause an incomplete and corrupt clone if a transfer block fills up just before sending the very last blob.

drh 2012-08-23 21:15 trunk
Commit 0db6f981bfc037ae7b153cca7e702713fa617e89
1 file changed +1 -1
+1 -1
--- src/xfer.c
+++ src/xfer.c
@@ -1046,11 +1046,11 @@
10461046
}else{
10471047
send_file(&xfer, seqno, 0, 1);
10481048
}
10491049
seqno++;
10501050
}
1051
- if( seqno>=max ) seqno = 0;
1051
+ if( seqno>max ) seqno = 0;
10521052
@ clone_seqno %d(seqno)
10531053
}else{
10541054
isClone = 1;
10551055
isPull = 1;
10561056
deltaFlag = 1;
10571057
--- src/xfer.c
+++ src/xfer.c
@@ -1046,11 +1046,11 @@
1046 }else{
1047 send_file(&xfer, seqno, 0, 1);
1048 }
1049 seqno++;
1050 }
1051 if( seqno>=max ) seqno = 0;
1052 @ clone_seqno %d(seqno)
1053 }else{
1054 isClone = 1;
1055 isPull = 1;
1056 deltaFlag = 1;
1057
--- src/xfer.c
+++ src/xfer.c
@@ -1046,11 +1046,11 @@
1046 }else{
1047 send_file(&xfer, seqno, 0, 1);
1048 }
1049 seqno++;
1050 }
1051 if( seqno>max ) seqno = 0;
1052 @ clone_seqno %d(seqno)
1053 }else{
1054 isClone = 1;
1055 isPull = 1;
1056 deltaFlag = 1;
1057

Keyboard Shortcuts

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