| 1087 | } |
| 1088 | |
| 1089 | static void got_flist_entry_status(enum festatus status, int ndx) |
| 1090 | { |
| 1091 | struct file_list *flist = flist_for_ndx(ndx, "got_flist_entry_status"); |
| 1092 | |
| 1093 | if (ndx < flist->ndx_start) |
| 1094 | exit_cleanup(RERR_PROTOCOL); |
| 1095 | |
| 1096 | if (remove_source_files) { |
| 1097 | active_filecnt--; |
| 1098 | active_bytecnt -= F_LENGTH(flist->files[ndx - flist->ndx_start]); |
| 1099 | } |
| 1100 | |
| 1101 | if (inc_recurse) |
| 1102 | flist->in_progress--; |
| 1103 | |
| 1104 | switch (status) { |
| 1105 | case FES_SUCCESS: |
| 1106 | if (remove_source_files) { |
| 1107 | if (local_server) |
| 1108 | send_msg(MSG_SUCCESS, num_dev_ino_buf, sizeof num_dev_ino_buf, -1); |
| 1109 | else |
| 1110 | send_msg_int(MSG_SUCCESS, ndx); |
| 1111 | } |
| 1112 | /* FALL THROUGH */ |
| 1113 | case FES_NO_SEND: |
| 1114 | #ifdef SUPPORT_HARD_LINKS |
| 1115 | if (preserve_hard_links) { |
| 1116 | struct file_struct *file = flist->files[ndx - flist->ndx_start]; |
| 1117 | if (F_IS_HLINKED(file)) { |
| 1118 | if (status == FES_NO_SEND) |
| 1119 | flist_ndx_push(&hlink_list, -2); /* indicates a failure follows */ |
| 1120 | flist_ndx_push(&hlink_list, ndx); |
| 1121 | if (inc_recurse) |
| 1122 | flist->in_progress++; |
| 1123 | } |
| 1124 | } |
| 1125 | #endif |
| 1126 | break; |
| 1127 | case FES_REDO: |
| 1128 | if (read_batch) { |
| 1129 | if (inc_recurse) |
| 1130 | flist->in_progress++; |
| 1131 | break; |
| 1132 | } |
| 1133 | if (inc_recurse) |
| 1134 | flist->to_redo++; |
| 1135 | flist_ndx_push(&redo_list, ndx); |
| 1136 | break; |
| 1137 | } |
| 1138 | } |
| 1139 | |
| 1140 | /* Note the fds used for the main socket (which might really be a pipe |
| 1141 | * for a local transfer, but we can ignore that). */ |
no test coverage detected