Commit 36e06705 authored by Geoff Simmons's avatar Geoff Simmons

Fix for changed VDP interface.

parent 58fe2f19
......@@ -362,8 +362,8 @@ check_pid(struct vdp_state *state, struct vsl_log *vsl, int options)
}
static int v_matchproto_(vdp_bytes_f)
vdp_bytes(struct req *req, enum vdp_action act, void **priv, const void *ptr,
ssize_t len)
vdp_bytes(struct vdp_ctx *ctx, enum vdp_action act, void **priv,
const void *ptr, ssize_t len)
{
struct vdp_state *state;
struct pollfd *fds;
......@@ -371,7 +371,7 @@ vdp_bytes(struct req *req, enum vdp_action act, void **priv, const void *ptr,
ssize_t nbytes;
struct VPFX(pipe_vdp) *obj;
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
CHECK_OBJ_NOTNULL(ctx, VDP_CTX_MAGIC);
assert(len >= 0);
AN(priv);
CAST_OBJ_NOTNULL(state, *priv, PIPE_VDP_STATE_MAGIC);
......@@ -399,7 +399,7 @@ vdp_bytes(struct req *req, enum vdp_action act, void **priv, const void *ptr,
if (retval == 0) {
if (obj->tmo_ms == 0)
continue;
VSLb(req->vsl, SLT_Error, "vdfp_pipe: vdp %s: timeout "
VSLb(ctx->vsl, SLT_Error, "vdfp_pipe: vdp %s: timeout "
"waiting for %s", obj->name, obj->path);
return (-1);
}
......@@ -409,7 +409,7 @@ vdp_bytes(struct req *req, enum vdp_action act, void **priv, const void *ptr,
continue;
AZ(fds[i].revents & POLLNVAL);
if (fds[i].revents & POLLERR) {
VSLb(req->vsl, SLT_Error, "vdfp_pipe: vdp %s: "
VSLb(ctx->vsl, SLT_Error, "vdfp_pipe: vdp %s: "
"error polling %s %s", obj->name,
obj->path, stream_name[i]);
close_all(fds);
......@@ -427,7 +427,7 @@ vdp_bytes(struct req *req, enum vdp_action act, void **priv, const void *ptr,
errno = 0;
nbytes = write(fds[STDIN_FILENO].fd, ptr, len);
if (nbytes < 0) {
VSLb(req->vsl, SLT_Error,
VSLb(ctx->vsl, SLT_Error,
"vdfp_pipe: vdp %s: error writing "
"to %s stdin: %s", obj->name,
obj->path, vstrerror(errno));
......@@ -452,7 +452,7 @@ vdp_bytes(struct req *req, enum vdp_action act, void **priv, const void *ptr,
errno = 0;
nbytes = read(fds[i].fd, state->buf, obj->bufsz);
if (nbytes < 0) {
VSLb(req->vsl, SLT_Error, "vdfp_pipe: vdp %s:"
VSLb(ctx->vsl, SLT_Error, "vdfp_pipe: vdp %s:"
" error reading %s from %s: %s",
obj->name, stream_name[i], obj->path,
vstrerror(errno));
......@@ -467,7 +467,7 @@ vdp_bytes(struct req *req, enum vdp_action act, void **priv, const void *ptr,
continue;
}
if (i == STDOUT_FILENO) {
retval = VDP_bytes(req, VDP_FLUSH, state->buf,
retval = VDP_bytes(ctx, VDP_FLUSH, state->buf,
nbytes);
if (retval < 0) {
close_all(fds);
......@@ -490,7 +490,7 @@ vdp_bytes(struct req *req, enum vdp_action act, void **priv, const void *ptr,
errmsg++;
continue;
}
VSLb(req->vsl, SLT_Error,
VSLb(ctx->vsl, SLT_Error,
"vdfp_pipe: vdp %s: %s stderr: %.*s",
obj->name, obj->path, (int)linelen,
errmsg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment