Commit 57ca7478 authored by Hardy Simpson's avatar Hardy Simpson

version: the real 1.2.9, fix another bug from buf.c when input is longer than buffer size

parent c3518078
......@@ -244,7 +244,7 @@ int zlog_buf_vprintf(zlog_buf_t * a_buf, const char *format, va_list args)
if (rc > 0) {
zc_error("conf limit to %ld, can't extend, so truncate", a_buf->size_max);
va_copy(ap, args);
size_left = a_buf->end_plus_1 - a_buf->start;
size_left = a_buf->end_plus_1 - a_buf->tail;
vsnprintf(a_buf->tail, size_left, format, ap);
a_buf->tail += size_left - 1;
//*(a_buf->tail) = '\0';
......
......@@ -443,7 +443,6 @@ err:
} \
} \
\
zc_error("%d, %d", a_thread->init_version, zlog_env_init_version); \
if (a_thread->init_version != zlog_env_init_version) { \
/* as mdc is still here, so can not easily del and new */ \
rd = zlog_thread_rebuild_msg_buf(a_thread, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment