Send the values from a sum_struct over the socket. Set sum to * NULL if there are no checksums to send. This is called by both * the generator and the sender. */
| 2070 | * NULL if there are no checksums to send. This is called by both |
| 2071 | * the generator and the sender. */ |
| 2072 | void write_sum_head(int f, struct sum_struct *sum) |
| 2073 | { |
| 2074 | static struct sum_struct null_sum; |
| 2075 | |
| 2076 | if (sum == NULL) |
| 2077 | sum = &null_sum; |
| 2078 | |
| 2079 | write_int(f, sum->count); |
| 2080 | write_int(f, sum->blength); |
| 2081 | if (protocol_version >= 27) |
| 2082 | write_int(f, sum->s2length); |
| 2083 | write_int(f, sum->remainder); |
| 2084 | } |
| 2085 | |
| 2086 | /* Sleep after writing to limit I/O bandwidth usage. |
| 2087 | * |
no test coverage detected