stash
This commit is contained in:
parent
5466bceb0e
commit
60c642bc15
1 changed files with 2 additions and 0 deletions
|
@ -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++;
|
||||||
|
|
Loading…
Reference in a new issue