| 1748 | } |
| 1749 | |
| 1750 | void wait_for_receiver(void) |
| 1751 | { |
| 1752 | if (!iobuf.raw_input_ends_before) |
| 1753 | read_a_msg(); |
| 1754 | |
| 1755 | if (iobuf.raw_input_ends_before) { |
| 1756 | int ndx = read_int(iobuf.in_fd); |
| 1757 | if (ndx < 0) { |
| 1758 | switch (ndx) { |
| 1759 | case NDX_FLIST_EOF: |
| 1760 | flist_eof = 1; |
| 1761 | if (DEBUG_GTE(FLIST, 3)) |
| 1762 | rprintf(FINFO, "[%s] flist_eof=1\n", who_am_i()); |
| 1763 | break; |
| 1764 | case NDX_DONE: |
| 1765 | msgdone_cnt++; |
| 1766 | break; |
| 1767 | default: |
| 1768 | exit_cleanup(RERR_STREAMIO); |
| 1769 | } |
| 1770 | } else { |
| 1771 | struct file_list *flist; |
| 1772 | flist_receiving_enabled = False; |
| 1773 | if (DEBUG_GTE(FLIST, 2)) { |
| 1774 | rprintf(FINFO, "[%s] receiving flist for dir %d\n", |
| 1775 | who_am_i(), ndx); |
| 1776 | } |
| 1777 | flist = recv_file_list(iobuf.in_fd, ndx); |
| 1778 | flist->parent_ndx = ndx; |
| 1779 | #ifdef SUPPORT_HARD_LINKS |
| 1780 | if (preserve_hard_links) |
| 1781 | match_hard_links(flist); |
| 1782 | #endif |
| 1783 | flist_receiving_enabled = True; |
| 1784 | } |
| 1785 | } |
| 1786 | } |
| 1787 | |
| 1788 | unsigned short read_shortint(int f) |
| 1789 | { |
no test coverage detected