This commit is contained in:
j3d1 2021-11-18 09:45:00 +01:00
parent 5466bceb0e
commit 60c642bc15

View file

@ -33,6 +33,8 @@ unsigned syslog_data_after(unsigned local_tail) {
extern "C" int syslog_copy_out(char *out, int len, unsigned local_tail) { extern "C" int syslog_copy_out(char *out, int len, unsigned local_tail) {
unsigned cnt = 0; unsigned cnt = 0;
// printf("<syslog(%d): [%d, %d] `%.*s`\n", streams, (local_tail & syslog_buffer_size), head,
// head - (local_tail & syslog_buffer_size), &syslog_buf[local_tail % syslog_buffer_size]);
while (cnt < syslog_data_after(local_tail) && cnt < len) { while (cnt < syslog_data_after(local_tail) && cnt < len) {
out[cnt] = syslog_buf[local_tail % syslog_buffer_size + cnt]; out[cnt] = syslog_buf[local_tail % syslog_buffer_size + cnt];
cnt++; cnt++;