Commit 19c7cb4a authored by Geoff Simmons's avatar Geoff Simmons

Just use vfp_entry->bytes_out for the out counters. So much easier.

Also remove some superfluous code.
parent 33eca69a
......@@ -159,9 +159,15 @@ void v_matchproto_(vfp_fini_f)
vfp_common_fini(struct vfp_ctx *ctx, struct vfp_entry *ent)
{
struct ece *ece;
const struct vfp_cfg *cfg;
CHECK_OBJ_NOTNULL(ctx, VFP_CTX_MAGIC);
CHECK_OBJ_NOTNULL(ent, VFP_ENTRY_MAGIC);
AN(ent->vfp);
CAST_OBJ_NOTNULL(cfg, ent->vfp->priv1, VFP_CFG_MAGIC);
if (cfg->stats != NULL)
cfg->stats->out += ent->bytes_out;
if (ent->priv1 == NULL)
return;
......
......@@ -200,13 +200,6 @@ hdrBufIn(struct ece_hdrbuf *hdr)
return (hdr->next_in);
}
static inline uint8_t *
recBufIn(struct ece_stream *stream)
{
CHECK_OBJ_NOTNULL(stream, ECE_STREAM_MAGIC);
return (stream->rec_next);
}
static inline uint8_t *
streamIn(struct ece_stream *stream)
{
......
......@@ -331,12 +331,9 @@ vfp_decrypt_pull(struct vfp_ctx *ctx, struct vfp_entry *ent, void *ptr,
AN(ece->buf);
setOutputBuf(stream, ptr, *lenp);
inb4 = recBufIn(stream);
flushRecBuf(stream);
if (isOutputBufFull(stream)) {
*lenp = outputLen(stream, p);
if (stats != NULL)
stats->out += *lenp;
return (VFP_OK);
}
......@@ -359,8 +356,6 @@ vfp_decrypt_pull(struct vfp_ctx *ctx, struct vfp_entry *ent, void *ptr,
ERR(ctx, "message truncated");
*lenp = outputLen(stream, p);
if (stats != NULL)
stats->out += *lenp;
return (vp);
}
......
......@@ -233,8 +233,6 @@ vfp_encrypt_pull(struct vfp_ctx *ctx, struct vfp_entry *ent, void *ptr,
flushHdrBuf(stream, hdrbuf);
if (isOutputBufFull(stream)) {
*lenp = outputLen(stream, p);
if (stats != NULL)
stats->out += *lenp;
return (VFP_OK);
}
}
......@@ -267,8 +265,6 @@ vfp_encrypt_pull(struct vfp_ctx *ctx, struct vfp_entry *ent, void *ptr,
if (encrypt_status == VFP_NULL) {
/* Output record was buffered */
*lenp = outputLen(stream, p);
if (stats != NULL)
stats->out += *lenp;
return (VFP_OK);
}
}
......@@ -277,8 +273,6 @@ vfp_encrypt_pull(struct vfp_ctx *ctx, struct vfp_entry *ent, void *ptr,
}
*lenp = outputLen(stream, p);
if (stats != NULL)
stats->out += *lenp;
return (vp);
}
......
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