mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-09 09:40:45 -04:00
3540. [bug] libt_api: t_info and t_assert were not thread safe.
This commit is contained in:
parent
65027e3472
commit
9e510086df
2 changed files with 8 additions and 4 deletions
2
CHANGES
2
CHANGES
|
|
@ -1,3 +1,5 @@
|
|||
3540. [bug] libt_api: t_info and t_assert were not thread safe.
|
||||
|
||||
3539. [port] win32: timestamp format didn't match other platforms.
|
||||
|
||||
--- 9.8.5rc1 released ---
|
||||
|
|
|
|||
|
|
@ -343,6 +343,7 @@ main(int argc, char **argv) {
|
|||
void
|
||||
t_assert(const char *component, int anum, int class, const char *what, ...) {
|
||||
va_list args;
|
||||
char buf[T_BIGBUF];
|
||||
|
||||
(void)printf("T:%s:%d:%s\n", component, anum, class == T_REQUIRED ?
|
||||
"A" : "C");
|
||||
|
|
@ -351,21 +352,22 @@ t_assert(const char *component, int anum, int class, const char *what, ...) {
|
|||
* Format text to a buffer.
|
||||
*/
|
||||
va_start(args, what);
|
||||
(void)vsnprintf(T_buf, sizeof(T_buf), what, args);
|
||||
(void)vsnprintf(buf, sizeof(buf), what, args);
|
||||
va_end(args);
|
||||
|
||||
(void)t_putinfo("A", T_buf);
|
||||
(void)t_putinfo("A", buf);
|
||||
(void)printf("\n");
|
||||
}
|
||||
|
||||
void
|
||||
t_info(const char *format, ...) {
|
||||
va_list args;
|
||||
char buf[T_BIGBUF];
|
||||
|
||||
va_start(args, format);
|
||||
(void) vsnprintf(T_buf, sizeof(T_buf), format, args);
|
||||
(void) vsnprintf(buf, sizeof(buf), format, args);
|
||||
va_end(args);
|
||||
(void) t_putinfo("I", T_buf);
|
||||
(void) t_putinfo("I", buf);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Reference in a new issue