projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ef4b11
)
Some sendfile() under Linux 2.4 is broken
author
Steven Barth
<steven@midlink.org>
Wed, 10 Jun 2009 23:28:16 +0000
(23:28 +0000)
committer
Steven Barth
<steven@midlink.org>
Wed, 10 Jun 2009 23:28:16 +0000
(23:28 +0000)
libs/nixio/lua/nixio/util.lua
patch
|
blob
|
history
diff --git
a/libs/nixio/lua/nixio/util.lua
b/libs/nixio/lua/nixio/util.lua
index 6f929519b73057c06b2a9d9def4bc6adbe585d81..0e8c90c9a5bf7d28edef4a9e91e93dbf04778b0b 100644
(file)
--- a/
libs/nixio/lua/nixio/util.lua
+++ b/
libs/nixio/lua/nixio/util.lua
@@
-23,6
+23,8
@@
local ZIOBLKSIZE = 65536
local socket = nixio.meta_socket
local tls_socket = nixio.meta_tls_socket
local file = nixio.meta_file
+local uname = nixio.uname()
+local ZBUG = uname.sysname == "Linux" and uname.release:sub(1, 3) == "2.4"
function consume(iter)
local tbl = {}
@@
-191,7
+193,7
@@
function meta.copyz(self, fd, size)
local sent, lsent, code, msg = 0
local splicable
- if self:is_file() then
+ if
not ZBUG and
self:is_file() then
local ftype = self:stat("type")
if nixio.sendfile and fd:is_socket() and ftype == "reg" then
repeat