aboutsummaryrefslogtreecommitdiffstats
path: root/main/http.c
diff options
context:
space:
mode:
authortwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-23 16:52:53 +0000
committertwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-23 16:52:53 +0000
commit7d11561950e65674d8bb144458e4cc95e4d0c2c1 (patch)
tree590983d8e779bbde67aee45280b23463bc6cf412 /main/http.c
parent4f7d300b2d5ce7c47c45740d220c6412dddca139 (diff)
Don't act like an http write failed when it didn't
fwrite returns the number of items written, not the number of bytes git-svn-id: http://svn.digium.com/svn/asterisk/trunk@253958 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/http.c')
-rw-r--r--main/http.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/http.c b/main/http.c
index 8aa50830a..89bde8679 100644
--- a/main/http.c
+++ b/main/http.c
@@ -413,7 +413,7 @@ void ast_http_send(struct ast_tcptls_session_instance *ser,
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));
}
}