This is only called by the sender. */
| 891 | |
| 892 | /* This is only called by the sender. */ |
| 893 | static void read_final_goodbye(int f_in, int f_out) |
| 894 | { |
| 895 | int i, iflags, xlen; |
| 896 | uchar fnamecmp_type; |
| 897 | char xname[MAXPATHLEN]; |
| 898 | |
| 899 | shutting_down = True; |
| 900 | |
| 901 | if (protocol_version < 29) |
| 902 | i = read_int(f_in); |
| 903 | else { |
| 904 | i = read_ndx_and_attrs(f_in, f_out, &iflags, &fnamecmp_type, xname, &xlen); |
| 905 | if (protocol_version >= 31 && i == NDX_DONE) { |
| 906 | if (am_sender) |
| 907 | write_ndx(f_out, NDX_DONE); |
| 908 | else { |
| 909 | if (batch_gen_fd >= 0) { |
| 910 | while (read_int(batch_gen_fd) != NDX_DEL_STATS) {} |
| 911 | read_del_stats(batch_gen_fd); |
| 912 | } |
| 913 | write_int(f_out, NDX_DONE); |
| 914 | } |
| 915 | i = read_ndx_and_attrs(f_in, f_out, &iflags, &fnamecmp_type, xname, &xlen); |
| 916 | } |
| 917 | } |
| 918 | |
| 919 | if (i != NDX_DONE) { |
| 920 | rprintf(FERROR, "Invalid packet at end of run (%d) [%s]\n", |
| 921 | i, who_am_i()); |
| 922 | exit_cleanup(RERR_PROTOCOL); |
| 923 | } |
| 924 | } |
| 925 | |
| 926 | static void do_server_sender(int f_in, int f_out, int argc, char *argv[]) |
| 927 | { |
no test coverage detected