[Freeswitch-trunk] [commit] r6434 - freeswitch/trunk/src

Freeswitch SVN mikej at freeswitch.org
Thu Nov 29 10:38:01 EST 2007


Author: mikej
Date: Thu Nov 29 10:38:00 2007
New Revision: 6434

Modified:
   freeswitch/trunk/src/switch_console.c

Log:
handle result of fwrite

Modified: freeswitch/trunk/src/switch_console.c
==============================================================================
--- freeswitch/trunk/src/switch_console.c	(original)
+++ freeswitch/trunk/src/switch_console.c	Thu Nov 29 10:38:00 2007
@@ -36,10 +36,14 @@
 
 SWITCH_DECLARE_NONSTD(switch_status_t) switch_console_stream_raw_write(switch_stream_handle_t *handle, uint8_t *data, switch_size_t datalen)
 {
+	switch_size_t nwrite;
 	FILE *out = switch_core_get_console();
 
 	if (out) {
-		fwrite(data, datalen, 1, out);
+		nwrite = fwrite(data, datalen, 1, out);
+		if (nwrite != datalen) {
+			return SWITCH_STATUS_FALSE;
+		}
 		return SWITCH_STATUS_SUCCESS;
 	}
 



More information about the Freeswitch-trunk mailing list