aboutsummaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1996-07-01 05:55:05 +0000
committerAndrew Tridgell <tridge@samba.org>1996-07-01 05:55:05 +0000
commit70d794dce9ba8fbf978185ea36f2ad4198b269ee (patch)
tree79261f607f9806f590b12ac09dcbbeef2d403ba6 /match.c
parent57e877a16d9b714d2ec79852dec2a0f65a32953e (diff)
downloadandroid_external_rsync-70d794dce9ba8fbf978185ea36f2ad4198b269ee.tar.gz
android_external_rsync-70d794dce9ba8fbf978185ea36f2ad4198b269ee.tar.bz2
android_external_rsync-70d794dce9ba8fbf978185ea36f2ad4198b269ee.zip
added hooks for compression in token.c
Diffstat (limited to 'match.c')
-rw-r--r--match.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/match.c b/match.c
index 971fa109..65901785 100644
--- a/match.c
+++ b/match.c
@@ -98,17 +98,13 @@ static void matched(int f,struct sum_struct *s,char *buf,off_t len,
fprintf(FERROR,"match at %d last_match=%d j=%d len=%d n=%d\n",
(int)offset,(int)last_match,i,(int)s->sums[i].len,n);
- if (n > 0) {
- int l = 0;
- write_int(f,n);
- while (l < n) {
- int n1 = MIN(CHUNK_SIZE,n-l);
- write_buf(f,map_ptr(buf,last_match+l,n1),n1);
- l += n1;
- }
- data_transfer += n;
- }
- write_int(f,-(i+1));
+ send_token(f,i,buf,last_match,n);
+
+ data_transfer += n;
+
+ if (i != -1)
+ last_match = offset + s->sums[i].len;
+
if (i != -1)
last_match = offset + s->sums[i].len;
if (n > 0)