[svn-commits] twilson: trunk r253958 - /trunk/main/http.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Mar 23 11:52:56 CDT 2010


Author: twilson
Date: Tue Mar 23 11:52:53 2010
New Revision: 253958

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=253958
Log:
Don't act like an http write failed when it didn't

fwrite returns the number of items written, not the number of bytes

Modified:
    trunk/main/http.c

Modified: trunk/main/http.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/http.c?view=diff&rev=253958&r1=253957&r2=253958
==============================================================================
--- trunk/main/http.c (original)
+++ trunk/main/http.c Tue Mar 23 11:52:53 2010
@@ -413,7 +413,7 @@
 			char buf[256];
 			int len;
 			while ((len = read(fd, buf, sizeof(buf))) > 0) {
-				if (fwrite(buf, len, 1, ser->f) != len) {
+				if (fwrite(buf, len, 1, ser->f) != 1) {
 					ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno));
 				}
 			}




More information about the svn-commits mailing list