Change. multi iterator returns response code as data for `done` row

master
Alexey Melnichuk 2014-09-10 15:20:58 +05:00
parent 1dbb374f1d
commit bf4b8b0b0b
2 changed files with 4 additions and 2 deletions

View File

@ -19,7 +19,7 @@ target('build', cURL)
install = target('install', {
file.group{odir=LIBDIR; src = cURL };
file.group{odir=J(LIBDIR, PROJECT); src = J("src", "lua") ; recurse = true };
file.group{odir=LIBDIR; src = J("src", "lua") ; recurse = true };
file.group{odir=J(ROOT, 'examples'); src = 'examples'; recurse = true };
file.group{odir=TESTDIR; src = 'test'; recurse = true };
})

View File

@ -83,7 +83,9 @@ local function make_iterator(self, perform)
for _, a in ipairs(self._easy) do
if e == a:handle() then e = a break end
end
if ok then buffers:append(e, "done", ok)
if ok then
ok = e:getinfo_response_code() or ok
buffers:append(e, "done", ok)
else buffers:append(e, "error", err) end
end
remain = n