aboutsummaryrefslogtreecommitdiff
path: root/src/lib/log/torlog.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-27 10:47:09 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-27 10:47:42 -0400
commit67135ca8e041ac922d1045fe833c8052e652e5e7 (patch)
tree399d4f1435ef6037b1bd36691c2d73927b4ebd69 /src/lib/log/torlog.c
parent05040a9e84caab86fb66793a7604887d2aaaa2d9 (diff)
downloadtor-67135ca8e041ac922d1045fe833c8052e652e5e7.tar.gz
tor-67135ca8e041ac922d1045fe833c8052e652e5e7.zip
Split read_all and write_all into separate functions
Diffstat (limited to 'src/lib/log/torlog.c')
-rw-r--r--src/lib/log/torlog.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/log/torlog.c b/src/lib/log/torlog.c
index 5709dd8199..b6088d3ebd 100644
--- a/src/lib/log/torlog.c
+++ b/src/lib/log/torlog.c
@@ -346,7 +346,7 @@ log_tor_version(logfile_t *lf, int reset)
tor_snprintf(buf+n, sizeof(buf)-n,
"Tor %s opening %slog file.\n", VERSION, is_new?"new ":"");
}
- if (write_all_to_fd(lf->fd, buf, strlen(buf)) < 0) /* error */
+ if (write_all_to_fd_minimal(lf->fd, buf, strlen(buf)) < 0) /* error */
return -1; /* failed */
return 0;
}
@@ -560,7 +560,7 @@ logfile_deliver(logfile_t *lf, const char *buf, size_t msg_len,
lf->callback(severity, domain, msg_after_prefix);
}
} else {
- if (write_all_to_fd(lf->fd, buf, msg_len) < 0) { /* error */
+ if (write_all_to_fd_minimal(lf->fd, buf, msg_len) < 0) { /* error */
/* don't log the error! mark this log entry to be blown away, and
* continue. */
lf->seems_dead = 1;