MCPcopy Index your code
hub / github.com/RsyncProject/rsync / log_exit

Function log_exit

log.c:890–916  ·  view source on GitHub ↗

* Called when the transfer is interrupted for some reason. * * Code is one of the RERR_* codes from errcode.h, or terminating * successfully. */

Source from the content-addressed store, hash-verified

888 * successfully.
889 */
890void log_exit(int code, const char *file, int line)
891{
892 /* The receiving side's stats are split between 2 procs until the
893 * end of the run, so only the sender can output non-final info. */
894 if (code == 0 || am_sender) {
895 rprintf(FLOG,"sent %s bytes received %s bytes total size %s\n",
896 big_num(stats.total_written),
897 big_num(stats.total_read),
898 big_num(stats.total_size));
899 }
900 if (code != 0 && am_server != 2) {
901 const char *name;
902
903 name = rerr_name(code);
904 if (!name)
905 name = "unexplained error";
906
907 /* VANISHED is not an error, only a warning */
908 if (code == RERR_VANISHED) {
909 rprintf(FWARNING, "rsync warning: %s (code %d) at %s(%d) [%s=%s]\n",
910 name, code, src_file(file), line, who_am_i(), rsync_version());
911 } else {
912 rprintf(FERROR, "rsync error: %s (code %d) at %s(%d) [%s=%s]\n",
913 name, code, src_file(file), line, who_am_i(), rsync_version());
914 }
915 }
916}

Callers 1

_exit_cleanupFunction · 0.85

Calls 6

big_numFunction · 0.85
rerr_nameFunction · 0.85
src_fileFunction · 0.85
rsync_versionFunction · 0.85
rprintfFunction · 0.70
who_am_iFunction · 0.70

Tested by

no test coverage detected