+/* This is only called by the sender. */
+static void read_final_goodbye(int f_in, int f_out, int flist_count)
+{
+ int i;
+
+ if (protocol_version < 29)
+ i = read_int(f_in);
+ else {
+ while ((i = read_int(f_in)) == flist_count
+ && read_shortint(f_in) == ITEM_IS_NEW) {
+ /* Forward the keep-alive (no-op) to the receiver. */
+ write_int(f_out, flist_count);
+ write_shortint(f_out, ITEM_IS_NEW);
+ }
+ }
+
+ if (i != -1) {
+ rprintf(FERROR, "Invalid packet from generator at end of run.\n");
+ exit_cleanup(RERR_PROTOCOL);
+ }
+}
+
+