mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 10:47:18 +00:00 
			
		
		
		
	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
This commit is contained in:
		| @@ -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)); | ||||
| 				} | ||||
| 			} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user