summaryrefslogtreecommitdiff
path: root/main/http.c
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2010-03-23 16:52:53 +0000
committerTerry Wilson <twilson@digium.com>2010-03-23 16:52:53 +0000
commit66053b8a58b15130dbe71ea6e4bfaefb7699a3a3 (patch)
tree590983d8e779bbde67aee45280b23463bc6cf412 /main/http.c
parentae6008ef3acdb582aca60357f7a7870aabba78a1 (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: https://origsvn.digium.com/svn/asterisk/trunk@253958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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));
}
}