+ if (delete_mode && !(delete_before+delete_during+delete_after)) {
+ if (protocol_version < 30)
+ delete_before = 1;
+ else
+ delete_during = 1;
+ }
+
+ if (protocol_version < 29) {
+ if (fuzzy_basis) {
+ rprintf(FERROR,
+ "--fuzzy requires protocol 29 or higher"
+ " (negotiated %d).\n",
+ protocol_version);
+ exit_cleanup(RERR_PROTOCOL);
+ }
+
+ if (basis_dir_cnt && inplace) {
+ rprintf(FERROR,
+ "%s with --inplace requires protocol 29 or higher"
+ " (negotiated %d).\n",
+ dest_option, protocol_version);
+ exit_cleanup(RERR_PROTOCOL);
+ }
+
+ if (basis_dir_cnt > 1) {
+ rprintf(FERROR,
+ "Using more than one %s option requires protocol"
+ " 29 or higher (negotiated %d).\n",
+ dest_option, protocol_version);
+ exit_cleanup(RERR_PROTOCOL);
+ }
+
+ if (prune_empty_dirs) {
+ rprintf(FERROR,
+ "--prune-empty-dirs requires protocol 29 or higher"
+ " (negotiated %d).\n",
+ protocol_version);
+ exit_cleanup(RERR_PROTOCOL);
+ }
+ } else if (protocol_version >= 30) {
+ if (recurse && allow_inc_recurse
+ && !delete_before && !delete_after && !delay_updates
+ && !use_qsort && !prune_empty_dirs)
+ inc_recurse = 1;
+ if (am_server || read_batch) {
+ int i_r = read_byte(f_in);
+ if (i_r && !inc_recurse) {
+ fprintf(stderr,
+ "Incompatible options specified for inc-recursive %s.\n",
+ read_batch ? "batch file" : "connection");
+ exit_cleanup(RERR_SYNTAX);
+ }
+ inc_recurse = i_r;
+ } else
+ write_byte(f_out, inc_recurse);
+ need_messages_from_generator = 1;
+ }
+
+#ifdef ICONV_OPTION
+ if (iconv_opt && (!am_sender || inc_recurse))
+ ic_ndx = ++file_extra_cnt;
+#endif
+
+ if (partial_dir && *partial_dir != '/' && (!am_server || local_server)) {
+ int flags = MATCHFLG_NO_PREFIXES | MATCHFLG_DIRECTORY;
+ if (!am_sender || protocol_version >= 30)
+ flags |= MATCHFLG_PERISHABLE;
+ parse_rule(&filter_list, partial_dir, flags, 0);
+ }
+
+
+#ifdef ICONV_OPTION
+ if (protect_args && files_from) {
+ if (am_sender)
+ filesfrom_convert = filesfrom_host && ic_send != (iconv_t)-1;
+ else
+ filesfrom_convert = !filesfrom_host && ic_recv != (iconv_t)-1;
+ }
+#endif
+
+ if (am_server) {
+ if (!checksum_seed)
+ checksum_seed = time(NULL);
+ write_int(f_out, checksum_seed);
+ } else {
+ checksum_seed = read_int(f_in);
+ }
+}