MCPcopy Index your code
hub / github.com/RsyncProject/rsync / simple_send_token

Function simple_send_token

token.c:314–328  ·  view source on GitHub ↗

non-compressing send token */

Source from the content-addressed store, hash-verified

312
313/* non-compressing send token */
314static void simple_send_token(int f, int32 token, struct map_struct *buf, OFF_T offset, int32 n)
315{
316 if (n > 0) {
317 int32 len = 0;
318 while (len < n) {
319 int32 n1 = MIN(CHUNK_SIZE, n-len);
320 write_int(f, n1);
321 write_buf(f, map_ptr(buf, offset+len, n1), n1);
322 len += n1;
323 }
324 }
325 /* a -2 token means to send data only and no token */
326 if (token != -2)
327 write_int(f, -(token+1));
328}
329
330/* Flag bytes in compressed stream are encoded as follows: */
331#define END_FLAG 0 /* that's all folks */

Callers 1

send_tokenFunction · 0.85

Calls 3

write_intFunction · 0.85
write_bufFunction · 0.85
map_ptrFunction · 0.85

Tested by

no test coverage detected