Blame SOURCES/wpa_supplicant-flush-debug-output.patch

fe252d
--- wpa_supplicant-0.6.3/src/utils/wpa_debug.c.flush-debug	2007-07-30 23:15:34.000000000 -0400
fe252d
+++ wpa_supplicant-0.6.3/src/utils/wpa_debug.c	2007-07-30 23:17:06.000000000 -0400
fe252d
@@ -157,6 +157,7 @@ void wpa_debug_print_timestamp(void)
fe252d
 	if (out_file) {
fe252d
 		fprintf(out_file, "%ld.%06u: ", (long) tv.sec,
fe252d
 			(unsigned int) tv.usec);
fe252d
+		fflush(out_file);
fe252d
 	} else
fe252d
 #endif /* CONFIG_DEBUG_FILE */
fe252d
 	printf("%ld.%06u: ", (long) tv.sec, (unsigned int) tv.usec);
fe252d
@@ -185,6 +186,7 @@ void wpa_printf(int level, char *fmt, ..
fe252d
 		if (out_file) {
fe252d
 			vfprintf(out_file, fmt, ap);
fe252d
 			fprintf(out_file, "\n");
fe252d
+			fflush(out_file);
fe252d
 		} else {
fe252d
 #endif /* CONFIG_DEBUG_FILE */
fe252d
 		vprintf(fmt, ap);
fe252d
@@ -217,6 +219,7 @@ static void _wpa_hexdump(int level, cons
fe252d
 			fprintf(out_file, " [REMOVED]");
fe252d
 		}
fe252d
 		fprintf(out_file, "\n");
fe252d
+		fflush(out_file);
fe252d
 	} else {
fe252d
 #endif /* CONFIG_DEBUG_FILE */
fe252d
 	printf("%s - hexdump(len=%lu):", title, (unsigned long) len);
fe252d
@@ -262,12 +265,14 @@ static void _wpa_hexdump_ascii(int level
fe252d
 			fprintf(out_file,
fe252d
 				"%s - hexdump_ascii(len=%lu): [REMOVED]\n",
fe252d
 				title, (unsigned long) len);
fe252d
+			fflush(out_file);
fe252d
 			return;
fe252d
 		}
fe252d
 		if (buf == NULL) {
fe252d
 			fprintf(out_file,
fe252d
 				"%s - hexdump_ascii(len=%lu): [NULL]\n",
fe252d
 				title, (unsigned long) len);
fe252d
+			fflush(out_file);
fe252d
 			return;
fe252d
 		}
fe252d
 		fprintf(out_file, "%s - hexdump_ascii(len=%lu):\n",
fe252d
@@ -292,6 +297,7 @@ static void _wpa_hexdump_ascii(int level
fe252d
 			pos += llen;
fe252d
 			len -= llen;
fe252d
 		}
fe252d
+		fflush(out_file);
fe252d
 	} else {
fe252d
 #endif /* CONFIG_DEBUG_FILE */
fe252d
 	if (!show) {