aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authortwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-15 21:42:33 +0000
committertwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-15 21:42:33 +0000
commitdfffed0b121a9dc275ac2d896bc95e94082ddd8b (patch)
tree271dbcbee76917fcec3b31228017720b205d9b63 /main
parented5fc9c3c2ba50a0ffa02670905189e74014a4e9 (diff)
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 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@270692 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/http.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/main/http.c b/main/http.c
index 89bde8679..dcbfc4d66 100644
--- a/main/http.c
+++ b/main/http.c
@@ -415,6 +415,7 @@ void ast_http_send(struct ast_tcptls_session_instance *ser,
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;
}
}
}