From: Wayne Davison Date: Fri, 21 Apr 2006 16:40:19 +0000 (+0000) Subject: - Got rid of the (mostly useless) io_read_phase and io_write_phase X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/b88c2e8ffe00b649664aee6ee70bb715e84629fa - Got rid of the (mostly useless) io_read_phase and io_write_phase variables. In the future it might be useful to get rsync to mention what kind of a message it was trying to write, but the 'phase "unknown"' output was ubiquitous and confusing. - Got rid of the completely unused write_int_named() function. --- diff --git a/io.c b/io.c index 09aab912..1513ae91 100644 --- a/io.c +++ b/io.c @@ -63,22 +63,6 @@ int ignore_timeout = 0; int batch_fd = -1; int batch_gen_fd = -1; -/** - * The connection might be dropped at some point; perhaps because the - * remote instance crashed. Just giving the offset on the stream is - * not very helpful. So instead we try to make io_phase_name point to - * something useful. - * - * For buffered/multiplexed I/O these names will be somewhat - * approximate; perhaps for ease of support we would rather make the - * buffer always flush when a single application-level I/O finishes. - * - * @todo Perhaps we want some simple stack functionality, but there's - * no need to overdo it. - **/ -const char *io_write_phase = phase_unknown; -const char *io_read_phase = phase_unknown; - /* Ignore an EOF error if non-zero. See whine_about_eof(). */ int kluge_around_eof = 0; @@ -1122,8 +1106,8 @@ static void writefd_unbuffered(int fd,char *buf,size_t len) if (fd == sock_f_out) close_multiplexing_out(); rsyserr(FERROR, errno, - "writefd_unbuffered failed to write %ld bytes: phase \"%s\" [%s]", - (long)len, io_write_phase, who_am_i()); + "writefd_unbuffered failed to write %ld bytes [%s]", + (long)len, who_am_i()); /* If the other side is sending us error messages, try * to grab any messages they sent before they died. */ while (fd == sock_f_out && io_multiplexing_in) { @@ -1259,13 +1243,6 @@ void write_int(int f,int32 x) writefd(f,b,4); } -void write_int_named(int f, int32 x, const char *phase) -{ - io_write_phase = phase; - write_int(f, x); - io_write_phase = phase_unknown; -} - /* * Note: int64 may actually be a 32-bit type if ./configure couldn't find any * 64-bit types on this platform.