X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/37077bd3393d04af810a04b122cf96bdf8fde076..0b7bce2c7bf03c49f028eaf57ffff24822ec5221:/log.c diff --git a/log.c b/log.c index 58c6bb19..609f3a58 100644 --- a/log.c +++ b/log.c @@ -53,12 +53,12 @@ extern char *logfile_name; extern iconv_t ic_chck; #endif #ifdef ICONV_OPTION -extern iconv_t ic_send, ic_recv; +extern iconv_t ic_recv; #endif -extern char curr_dir[]; +extern char curr_dir[MAXPATHLEN]; extern char *module_dir; extern unsigned int module_dirlen; -extern char sender_file_sum[]; +extern char sender_file_sum[MAX_DIGEST_LEN]; static int log_initialised; static int logfile_was_closed; @@ -263,13 +263,17 @@ void rwrite(enum logcode code, const char *buf, int len, int is_utf8) if (am_server && msg_fd_out >= 0) { assert(!is_utf8); - /* Pass the message to our sibling. */ + /* Pass the message to our sibling in native charset. */ send_msg((enum msgcode)code, buf, len, 0); return; } if (code == FERROR_SOCKET) /* This gets simplified for a non-sibling. */ code = FERROR; + else if (code == FERROR_UTF8) { + is_utf8 = 1; + code = FERROR; + } if (code == FCLIENT) code = FINFO; @@ -351,7 +355,7 @@ output_msg: int ierrno; INIT_CONST_XBUF(outbuf, convbuf); - INIT_XBUF(inbuf, (char*)buf, len, -1); + INIT_XBUF(inbuf, (char*)buf, len, (size_t)-1); while (inbuf.len) { iconvbufs(ic, &inbuf, &outbuf, 0);