[asterisk-commits] twilson: trunk r270692 - /trunk/main/http.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jun 15 16:42:37 CDT 2010


Author: twilson
Date: Tue Jun 15 16:42:33 2010
New Revision: 270692

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=270692
Log:
Don't continue sending the file when there has been an error

If there is a problem with a firmware file, Polycom phones will close the
connection. We were continuing to send the file anyway. There should be no
reason to continue sending a file if there is an error writing it.

(closes issue #16682)
Reported by: lmadsen

Modified:
    trunk/main/http.c

Modified: trunk/main/http.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/http.c?view=diff&rev=270692&r1=270691&r2=270692
==============================================================================
--- trunk/main/http.c (original)
+++ trunk/main/http.c Tue Jun 15 16:42:33 2010
@@ -415,6 +415,7 @@
 			while ((len = read(fd, buf, sizeof(buf))) > 0) {
 				if (fwrite(buf, len, 1, ser->f) != 1) {
 					ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno));
+					break;
 				}
 			}
 		}




More information about the asterisk-commits mailing list