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

Function start_filesfrom_forwarding

io.c:1228–1240  ·  view source on GitHub ↗

When we're the receiver and we have a local --files-from list of names * that needs to be sent over the socket to the sender, we have to do two * things at the same time: send the sender a list of what files we're * processing and read the incoming file+info list from the sender. We do * this by making recv_file_list() call forward_filesfrom_data(), which * will ensure that we forward data t

Source from the content-addressed store, hash-verified

1226 * will ensure that we forward data to the sender until we get some data
1227 * for recv_file_list() to use. */
1228void start_filesfrom_forwarding(int fd)
1229{
1230 if (protocol_version < 31 && OUT_MULTIPLEXED) {
1231 /* Older protocols send the files-from data w/o packaging
1232 * it in multiplexed I/O packets, so temporarily switch
1233 * to buffered I/O to match this behavior. */
1234 iobuf.msg.pos = iobuf.msg.len = 0; /* Be extra sure no messages go out. */
1235 ff_reenable_multiplex = io_end_multiplex_out(MPLX_TO_BUFFERED);
1236 }
1237 ff_forward_fd = fd;
1238
1239 alloc_xbuf(&ff_xb, FILESFROM_BUFLEN);
1240}
1241
1242/* Read a line into the "buf" buffer. */
1243int read_line(int fd, char *buf, size_t bufsiz, int flags)

Callers 2

do_server_recvFunction · 0.85
client_runFunction · 0.85

Calls 2

io_end_multiplex_outFunction · 0.85
alloc_xbufFunction · 0.85

Tested by

no test coverage detected