git://git.exim.org
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
51a87a4
)
tidying
author
Jeremy Harris
<jgh146exb@wizmail.org>
Sun, 18 Aug 2024 11:25:04 +0000
(12:25 +0100)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Sun, 18 Aug 2024 12:26:24 +0000
(13:26 +0100)
src/src/log.c
patch
|
blob
|
history
diff --git
a/src/src/log.c
b/src/src/log.c
index 2e97660a06533ae5e04673030f344b1b00f316e8..1b4cea1552d4db78f138a99db890bff88dfab455 100644
(file)
--- a/
src/src/log.c
+++ b/
src/src/log.c
@@
-734,7
+734,7
@@
return total_written;
static inline ssize_t
write_gstring_to_fd_buf(int fd, const gstring * g)
{
static inline ssize_t
write_gstring_to_fd_buf(int fd, const gstring * g)
{
-return write_to_fd_buf(fd, g->s, g
->ptr
);
+return write_to_fd_buf(fd, g->s, g
string_length(g)
);
}
}
@@
-1008,9
+1008,9
@@
string_fmt_append_noextend(&gs, "%s ", tod_stamp(tod_log));
if (LOGGING(pid))
{
if (LOGGING(pid))
{
- if (!syslog_pid) pid_position[0] = g
->ptr;
/* remember begin … */
+ if (!syslog_pid) pid_position[0] = g
string_length(g);
/* remember begin … */
string_fmt_append_noextend(g, "[%ld] ", (long)getpid());
string_fmt_append_noextend(g, "[%ld] ", (long)getpid());
- if (!syslog_pid) pid_position[1] = g
->ptr;
/* … and end+1 of the PID */
+ if (!syslog_pid) pid_position[1] = g
string_length(g);
/* … and end+1 of the PID */
}
if (f.really_exim && message_id[0])
}
if (f.really_exim && message_id[0])
@@
-1027,7
+1027,7
@@
va_start(ap, format);
if (!string_vformat(g, SVFMT_TAINT_NOCHK, format, ap))
{
if (!string_vformat(g, SVFMT_TAINT_NOCHK, format, ap))
{
- uschar * s = US"**** log string overflowed log buffer ****
\n
";
+ uschar * s = US"**** log string overflowed log buffer ****";
gstring_trim(g, Ustrlen(s));
string_fmt_append_noextend(g, "%s", s);
}
gstring_trim(g, Ustrlen(s));
string_fmt_append_noextend(g, "%s", s);
}
@@
-1133,9
+1133,10
@@
if ( flags & LOG_MAIN
/* Failing to write to the log is disastrous */
/* Failing to write to the log is disastrous */
- if ((written_len = write_gstring_to_fd_buf(mainlogfd, g)) != g->ptr)
+ if ( (written_len = write_gstring_to_fd_buf(mainlogfd, g))
+ != gstring_length(g))
{
{
- log_write_failed(US"main log", g
->ptr
, written_len);
+ log_write_failed(US"main log", g
string_length(g)
, written_len);
/* That function does not return */
}
}
/* That function does not return */
}
}
@@
-1233,7
+1234,8
@@
if (flags & LOG_REJECT)
if (fstat(rejectlogfd, &statbuf) >= 0) rejectlog_inode = statbuf.st_ino;
}
if (fstat(rejectlogfd, &statbuf) >= 0) rejectlog_inode = statbuf.st_ino;
}
- if ((written_len = write_gstring_to_fd_buf(rejectlogfd, g)) != g->ptr)
+ if ( (written_len = write_gstring_to_fd_buf(rejectlogfd, g))
+ != gstring_length(g))
{
log_write_failed(US"reject log", g->ptr, written_len);
/* That function does not return */
{
log_write_failed(US"reject log", g->ptr, written_len);
/* That function does not return */
@@
-1267,7
+1269,8
@@
if (flags & LOG_PANIC)
if (panic_save_buffer)
(void) write(paniclogfd, panic_save_buffer, Ustrlen(panic_save_buffer));
if (panic_save_buffer)
(void) write(paniclogfd, panic_save_buffer, Ustrlen(panic_save_buffer));
- if ((written_len = write_gstring_to_fd_buf(paniclogfd, g)) != g->ptr)
+ if ( (written_len = write_gstring_to_fd_buf(paniclogfd, g))
+ != gstring_length(g))
{
int save_errno = errno;
write_syslog(LOG_CRIT, log_buffer);
{
int save_errno = errno;
write_syslog(LOG_CRIT, log_buffer);