| 1255 | |
| 1256 | |
| 1257 | void start_server(int f_in, int f_out, int argc, char *argv[]) |
| 1258 | { |
| 1259 | set_nonblocking(f_in); |
| 1260 | set_nonblocking(f_out); |
| 1261 | |
| 1262 | io_set_sock_fds(f_in, f_out); |
| 1263 | setup_protocol(f_out, f_in); |
| 1264 | |
| 1265 | if (protocol_version >= 23) |
| 1266 | io_start_multiplex_out(f_out); |
| 1267 | if (am_daemon && io_timeout && protocol_version >= 31) |
| 1268 | send_msg_int(MSG_IO_TIMEOUT, io_timeout); |
| 1269 | |
| 1270 | if (am_sender) { |
| 1271 | keep_dirlinks = 0; /* Must be disabled on the sender. */ |
| 1272 | if (need_messages_from_generator) |
| 1273 | io_start_multiplex_in(f_in); |
| 1274 | else |
| 1275 | io_start_buffering_in(f_in); |
| 1276 | recv_filter_list(f_in); |
| 1277 | do_server_sender(f_in, f_out, argc, argv); |
| 1278 | } else |
| 1279 | do_server_recv(f_in, f_out, argc, argv); |
| 1280 | exit_cleanup(0); |
| 1281 | } |
| 1282 | |
| 1283 | /* This is called once the connection has been negotiated. It is used |
| 1284 | * for rsyncd, remote-shell, and local connections. */ |
no test coverage detected