Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- added an internal io_error flag. Whenever an io error occurs (such
[rsync/rsync.git]
/
match.c
diff --git
a/match.c
b/match.c
index
d5ceba3
..
a97e7e1
100644
(file)
--- a/
match.c
+++ b/
match.c
@@
-39,7
+39,7
@@
static int data_transfer;
static int total_false_alarms;
static int total_tag_hits;
static int total_matches;
static int total_false_alarms;
static int total_tag_hits;
static int total_matches;
-static
off_t
total_data_transfer;
+static
int64
total_data_transfer;
struct target {
struct target {
@@
-96,8
+96,8
@@
static void matched(int f,struct sum_struct *s,struct map_struct *buf,
off_t n = offset - last_match;
int j;
off_t n = offset - last_match;
int j;
- if (verbose > 2 && i
!= -1
)
- fprintf(F
ERROR
,"match at %d last_match=%d j=%d len=%d n=%d\n",
+ if (verbose > 2 && i
>= 0
)
+ fprintf(F
INFO
,"match at %d last_match=%d j=%d len=%d n=%d\n",
(int)offset,(int)last_match,i,(int)s->sums[i].len,(int)n);
send_token(f,i,buf,last_match,n,i==-1?0:s->sums[i].len);
(int)offset,(int)last_match,i,(int)s->sums[i].len,(int)n);
send_token(f,i,buf,last_match,n,i==-1?0:s->sums[i].len);
@@
-106,7
+106,7
@@
static void matched(int f,struct sum_struct *s,struct map_struct *buf,
if (n > 0)
write_flush(f);
if (n > 0)
write_flush(f);
- if (i
!= -1
)
+ if (i
>= 0
)
n += s->sums[i].len;
for (j=0;j<n;j+=CHUNK_SIZE) {
n += s->sums[i].len;
for (j=0;j<n;j+=CHUNK_SIZE) {
@@
-115,8
+115,10
@@
static void matched(int f,struct sum_struct *s,struct map_struct *buf,
}
}
- if (i
!= -1
)
+ if (i
>= 0
)
last_match = offset + s->sums[i].len;
last_match = offset + s->sums[i].len;
+ else
+ last_match = offset;
}
}
@@
-131,7
+133,7
@@
static void hash_search(int f,struct sum_struct *s,
signed char *map;
if (verbose > 2)
signed char *map;
if (verbose > 2)
- fprintf(F
ERROR
,"hash search b=%d len=%d\n",s->n,(int)len);
+ fprintf(F
INFO
,"hash search b=%d len=%d\n",s->n,(int)len);
k = MIN(len, s->n);
k = MIN(len, s->n);
@@
-141,14
+143,14
@@
static void hash_search(int f,struct sum_struct *s,
s1 = sum & 0xFFFF;
s2 = sum >> 16;
if (verbose > 3)
s1 = sum & 0xFFFF;
s2 = sum >> 16;
if (verbose > 3)
- fprintf(F
ERROR
, "sum=%.8x k=%d\n", sum, k);
+ fprintf(F
INFO
, "sum=%.8x k=%d\n", sum, k);
offset = 0;
end = len + 1 - s->sums[s->count-1].len;
if (verbose > 3)
offset = 0;
end = len + 1 - s->sums[s->count-1].len;
if (verbose > 3)
- fprintf(F
ERROR
,"hash search s->n=%d len=%d count=%d\n",
+ fprintf(F
INFO
,"hash search s->n=%d len=%d count=%d\n",
s->n,(int)len,s->count);
do {
s->n,(int)len,s->count);
do {
@@
-157,7
+159,7
@@
static void hash_search(int f,struct sum_struct *s,
j = tag_table[t];
if (verbose > 4)
j = tag_table[t];
if (verbose > 4)
- fprintf(F
ERROR
,"offset=%d sum=%08x\n",(int)offset,sum);
+ fprintf(F
INFO
,"offset=%d sum=%08x\n",(int)offset,sum);
if (j == NULL_TAG) {
goto null_tag;
if (j == NULL_TAG) {
goto null_tag;
@@
-171,7
+173,7
@@
static void hash_search(int f,struct sum_struct *s,
if (sum != s->sums[i].sum1) continue;
if (verbose > 3)
if (sum != s->sums[i].sum1) continue;
if (verbose > 3)
- fprintf(F
ERROR
,"potential match at %d target=%d %d sum=%08x\n",
+ fprintf(F
INFO
,"potential match at %d target=%d %d sum=%08x\n",
(int)offset,j,i,sum);
if (!done_csum2) {
(int)offset,j,i,sum);
if (!done_csum2) {
@@
-234,12
+236,12
@@
void match_sums(int f,struct sum_struct *s,struct map_struct *buf,off_t len)
build_hash_table(s);
if (verbose > 2)
build_hash_table(s);
if (verbose > 2)
- fprintf(F
ERROR
,"built hash table\n");
+ fprintf(F
INFO
,"built hash table\n");
hash_search(f,s,buf,len);
if (verbose > 2)
hash_search(f,s,buf,len);
if (verbose > 2)
- fprintf(F
ERROR
,"done hash search\n");
+ fprintf(F
INFO
,"done hash search\n");
} else {
matched(f,s,buf,len,-1);
}
} else {
matched(f,s,buf,len,-1);
}
@@
-248,7
+250,7
@@
void match_sums(int f,struct sum_struct *s,struct map_struct *buf,off_t len)
if (remote_version >= 14) {
if (verbose > 2)
if (remote_version >= 14) {
if (verbose > 2)
- fprintf(F
ERROR
,"sending file_sum\n");
+ fprintf(F
INFO
,"sending file_sum\n");
write_buf(f,file_sum,MD4_SUM_LENGTH);
}
write_buf(f,file_sum,MD4_SUM_LENGTH);
}
@@
-258,7
+260,7
@@
void match_sums(int f,struct sum_struct *s,struct map_struct *buf,off_t len)
}
if (verbose > 2)
}
if (verbose > 2)
- fprintf(F
ERROR
, "false_alarms=%d tag_hits=%d matches=%d\n",
+ fprintf(F
INFO
, "false_alarms=%d tag_hits=%d matches=%d\n",
false_alarms, tag_hits, matches);
total_tag_hits += tag_hits;
false_alarms, tag_hits, matches);
total_tag_hits += tag_hits;