X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/aa126974ba0c77b29a0896888bd58b2bee750f20..6dfb45bcdf7f40e970a7be7bb67a567dd1484744:/log.c diff --git a/log.c b/log.c index 045f0317..532803f2 100644 --- a/log.c +++ b/log.c @@ -41,6 +41,7 @@ struct { { RERR_PROTOCOL , "protocol incompatibility" }, { RERR_FILESELECT , "errors selecting input/output files, dirs" }, { RERR_UNSUPPORTED, "requested action not supported" }, + { RERR_STARTCLIENT, "error starting client-server protocol" }, { RERR_SOCKETIO , "error in socket IO" }, { RERR_FILEIO , "error in file IO" }, { RERR_STREAMIO , "error in rsync protocol data stream" }, @@ -341,6 +342,8 @@ void rsyserr(enum logcode code, int errcode, const char *format, ...) len = vsnprintf(buf, sizeof(buf), format, ap); va_end(ap); + /* TODO: Put in RSYNC_NAME at the start. */ + if ((size_t) len > sizeof(buf)-1) exit_cleanup(RERR_MESSAGEIO); @@ -559,20 +562,16 @@ void log_exit(int code, const char *file, int line) } } - - - -/* log the incoming transfer of a file for interactive use, this - will be called at the end where the client was run - - it i called when a file starts to be transferred -*/ +/* + * Log the incoming transfer of a file for interactive use, + * this will be called at the end where the client was run. + * Called when a file starts to be transferred. + */ void log_transfer(struct file_struct *file, const char *fname) { extern int verbose; if (!verbose) return; - rprintf(FINFO,"%s\n", fname); + rprintf(FINFO, "%s\n", fname); } -