2021-11-22 15:56:14 +00:00
|
|
|
--- a/src/utils/wpa_debug.c
|
|
|
|
+++ b/src/utils/wpa_debug.c
|
|
|
|
@@ -79,6 +79,7 @@ void wpa_debug_print_timestamp(void)
|
|
|
|
if (out_file)
|
2020-10-15 20:47:29 +00:00
|
|
|
fprintf(out_file, "%ld.%06u: ", (long) tv.sec,
|
|
|
|
(unsigned int) tv.usec);
|
2021-11-22 15:56:14 +00:00
|
|
|
+ fflush(out_file);
|
2020-10-15 20:47:29 +00:00
|
|
|
#endif /* CONFIG_DEBUG_FILE */
|
2021-11-22 15:56:14 +00:00
|
|
|
if (!out_file && !wpa_debug_syslog)
|
|
|
|
printf("%ld.%06u: ", (long) tv.sec, (unsigned int) tv.usec);
|
|
|
|
@@ -230,6 +231,7 @@ void wpa_printf(int level, const char *f
|
|
|
|
va_start(ap, fmt);
|
2020-10-15 20:47:29 +00:00
|
|
|
vfprintf(out_file, fmt, ap);
|
|
|
|
fprintf(out_file, "\n");
|
|
|
|
+ fflush(out_file);
|
2021-11-22 15:56:14 +00:00
|
|
|
va_end(ap);
|
|
|
|
}
|
2020-10-15 20:47:29 +00:00
|
|
|
#endif /* CONFIG_DEBUG_FILE */
|
2021-11-22 15:56:14 +00:00
|
|
|
@@ -365,6 +367,7 @@ static void _wpa_hexdump(int level, cons
|
2020-10-15 20:47:29 +00:00
|
|
|
fprintf(out_file, " [REMOVED]");
|
|
|
|
}
|
|
|
|
fprintf(out_file, "\n");
|
|
|
|
+ fflush(out_file);
|
2021-11-22 15:56:14 +00:00
|
|
|
}
|
2020-10-15 20:47:29 +00:00
|
|
|
#endif /* CONFIG_DEBUG_FILE */
|
2021-11-22 15:56:14 +00:00
|
|
|
if (!wpa_debug_syslog && !out_file) {
|
|
|
|
@@ -468,6 +471,8 @@ static void _wpa_hexdump_ascii(int level
|
2020-10-15 20:47:29 +00:00
|
|
|
}
|
2021-11-22 15:56:14 +00:00
|
|
|
}
|
|
|
|
file_done:
|
|
|
|
+ if (out_file)
|
2020-10-15 20:47:29 +00:00
|
|
|
+ fflush(out_file);
|
|
|
|
#endif /* CONFIG_DEBUG_FILE */
|
2021-11-22 15:56:14 +00:00
|
|
|
if (!wpa_debug_syslog && !out_file) {
|
|
|
|
if (!show) {
|