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
| 1226 | * will ensure that we forward data to the sender until we get some data |
| 1227 | * for recv_file_list() to use. */ |
| 1228 | void 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. */ |
| 1243 | int read_line(int fd, char *buf, size_t bufsiz, int flags) |
no test coverage detected