version 1.93, 2016/09/03 12:29:30 |
version 1.94, 2016/09/03 13:26:50 |
|
|
} |
} |
|
|
while ((nr = read(ifd, buf, sizeof(buf))) > 0) |
while ((nr = read(ifd, buf, sizeof(buf))) > 0) |
if ((method->write)(cookie, buf, nr) != nr) { |
if (method->write(cookie, buf, nr) != nr) { |
if (verbose >= 0) |
if (verbose >= 0) |
warn("%s", out); |
warn("%s", out); |
error = FAILURE; |
error = FAILURE; |
|
|
error = FAILURE; |
error = FAILURE; |
} |
} |
|
|
if ((method->close)(cookie, &info, out, sb)) { |
if (method->close(cookie, &info, out, sb)) { |
if (!error && verbose >= 0) |
if (!error && verbose >= 0) |
warn("%s", out); |
warn("%s", out); |
error = FAILURE; |
error = FAILURE; |
|
|
if (ofd < 0) { |
if (ofd < 0) { |
if (verbose >= 0) |
if (verbose >= 0) |
warn("%s", in); |
warn("%s", in); |
(method->close)(cookie, NULL, NULL, NULL); |
method->close(cookie, NULL, NULL, NULL); |
return (FAILURE); |
return (FAILURE); |
} |
} |
} |
} |
|
|
while ((nr = (method->read)(cookie, buf, sizeof(buf))) > 0) { |
while ((nr = method->read(cookie, buf, sizeof(buf))) > 0) { |
if (ofd != -1 && write(ofd, buf, nr) != nr) { |
if (ofd != -1 && write(ofd, buf, nr) != nr) { |
if (verbose >= 0) |
if (verbose >= 0) |
warn("%s", out); |
warn("%s", out); |
|
|
error = errno == EINVAL ? WARNING : FAILURE; |
error = errno == EINVAL ? WARNING : FAILURE; |
} |
} |
|
|
if ((method->close)(cookie, &info, NULL, NULL)) { |
if (method->close(cookie, &info, NULL, NULL)) { |
if (!error && verbose >= 0) |
if (!error && verbose >= 0) |
warnx("%s", in); |
warnx("%s", in); |
error = FAILURE; |
error = FAILURE; |