search for: send_null_sum

Displaying 3 results from an estimated 3 matches for "send_null_sum".

Did you mean: send_null_sums
2002 Apr 23
1
patch: timeout problem solved
...+49 431 988-1260 -------------- next part -------------- --- rsync-2.5.5/generator.c Mon Mar 25 06:54:31 2002 +++ rsync-2.5.5-gen/generator.c Tue Apr 23 01:51:32 2002 @@ -102,28 +102,12 @@ /* send a sums struct down a fd */ -static void send_sums(struct sum_struct *s, int f_out) +static void send_null_sums(int f_out) { - if (s) { - size_t i; - - /* tell the other guy how many we are going to be - doing and how many bytes there are in the last - chunk */ - write_int(f_out, s->count); - write_int(f_out, s->n); - write_int(f_out, s->remainder); - - for (i = 0; i < s->count...
2003 Mar 23
1
[RFC] dynamic checksum size
...hes block checksums. I found that there was a great deal of code duplication involved with reading and writing the sum_struct fields. I have eliminated the duplication by consolidating that transmission in the new (read|write)_sum_head functions. A added bonus is that write_sum_head replaces the send_null_sums function. The Adleresque checksum1 is in no way affected. The varsumlen patch builds on that groundwork by implementing a simple heuristic to generate the per-file sum2 lengths. It remains two bytes until the file is 8193 blocks at which it increments and continues incrementing each time the blo...
2003 Mar 30
1
[RFC][patch] dynamic rolling block and sum sizes II
...s, int ai_family, int ai_socktype, --- generator.c Sat Mar 29 11:11:30 2003 +++ generator.c Sat Mar 29 12:16:02 2003 @@ -116,13 +116,21 @@ /* - send a header that says "we have no checksums" down the f_out fd + * NULL sum_struct means we have no checksums */ -static void send_null_sums(int f_out) + +void write_sum_head(int f, struct sum_struct *sum) { - write_int(f_out, 0); - write_int(f_out, block_size); - write_int(f_out, 0); + static struct sum_struct null_sum; + + if (sum == (struct sum_struct *)NULL) + sum = &null_sum; + + write_int(f, sum->count); + write_int(f, s...