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

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