X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/9bed85542c5219f000035598cf9d01c16ef0e4a5..refs/heads/hacks/missing-args-b3.0.x:/rsync.c diff --git a/rsync.c b/rsync.c index 50a50ba0..8fad3483 100644 --- a/rsync.c +++ b/rsync.c @@ -3,7 +3,7 @@ * * Copyright (C) 1996 Andrew Tridgell * Copyright (C) 1996 Paul Mackerras - * Copyright (C) 2003-2008 Wayne Davison + * Copyright (C) 2003-2009 Wayne Davison * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -48,8 +48,6 @@ extern int inplace; extern int flist_eof; extern int keep_dirlinks; extern int make_backups; -extern int delete_during; -extern int check_for_io_err; extern struct file_list *cur_flist, *first_flist, *dir_flist; extern struct chmod_mode_struct *daemon_chmod_modes; #ifdef ICONV_OPTION @@ -223,16 +221,19 @@ void send_protected_args(int fd, char *args[]) if (verbose > 1) print_child_argv("protected args:", args + i + 1); do { + if (!args[i][0]) + write_buf(fd, ".", 2); #ifdef ICONV_OPTION - if (convert) { + else if (convert) { INIT_XBUF_STRLEN(inbuf, args[i]); iconvbufs(ic_send, &inbuf, &outbuf, ICB_EXPAND_OUT | ICB_INCLUDE_BAD | ICB_INCLUDE_INCOMPLETE); outbuf.buf[outbuf.len] = '\0'; write_buf(fd, outbuf.buf, outbuf.len + 1); outbuf.len = 0; - } else + } #endif + else write_buf(fd, args[i], strlen(args[i]) + 1); } while (args[++i]); write_byte(fd, 0); @@ -255,15 +256,8 @@ int read_ndx_and_attrs(int f_in, int *iflag_ptr, uchar *type_ptr, while (1) { ndx = read_ndx(f_in); - if (ndx >= 0) { - if (check_for_io_err) { - /* Let generator know there was no I/O error. */ - send_msg_int(MSG_IO_ERROR, 0); - check_for_io_err = 0; - } + if (ndx >= 0) break; - } - check_for_io_err = 0; if (ndx == NDX_DONE) return ndx; if (!inc_recurse || am_sender) { @@ -305,10 +299,6 @@ int read_ndx_and_attrs(int f_in, int *iflag_ptr, uchar *type_ptr, flist->parent_ndx = ndx; stop_flist_forward(); verbose = save_verbose; - /* If the sender is going to send us an MSG_IO_ERROR value, it - * will always be the very next message following a file list. */ - if (delete_during) - check_for_io_err = 1; } iflags = protocol_version >= 29 ? read_shortint(f_in)