Commit a4813914 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

filter: Mark VRT_{Add,Remove}V[DF]P() as deprecated

parent 8c3821c6
......@@ -93,9 +93,8 @@ enum vfp_status VFP_Suck(struct vfp_ctx *, void *p, ssize_t *lp);
enum vfp_status VFP_Error(struct vfp_ctx *, const char *fmt, ...)
v_printflike_(2, 3);
/* These two deprecated per 2021-12-01, add v_deprecated_ after next major */
void VRT_AddVFP(VRT_CTX, const struct vfp *);
void VRT_RemoveVFP(VRT_CTX, const struct vfp *);
void v_deprecated_ VRT_AddVFP(VRT_CTX, const struct vfp *);
void v_deprecated_ VRT_RemoveVFP(VRT_CTX, const struct vfp *);
/* Deliver processors ------------------------------------------------*/
......@@ -152,9 +151,8 @@ struct vdp_ctx {
int VDP_bytes(struct vdp_ctx *, enum vdp_action act, const void *, ssize_t);
/* These two deprecated per 2021-12-01, add v_deprecated_ after next major */
void VRT_AddVDP(VRT_CTX, const struct vdp *);
void VRT_RemoveVDP(VRT_CTX, const struct vdp *);
void v_deprecated_ VRT_AddVDP(VRT_CTX, const struct vdp *);
void v_deprecated_ VRT_RemoveVDP(VRT_CTX, const struct vdp *);
/* Registry functions -------------------------------------------------*/
const char *VRT_AddFilter(VRT_CTX, const struct vfp *, const struct vdp *);
......
......@@ -53,6 +53,11 @@
* Whenever something is deleted or changed in a way which is not
* binary/load-time compatible, increment MAJOR version
*
* NEXT (2022-09-15)
* VRT_AddVDP() deprecated
* VRT_AddVFP() deprecated
* VRT_RemoveVDP() deprecated
* VRT_RemoveVFP() deprecated
* 15.0 (2022-03-15)
* VRT_r_req_transport() added
* VRT_Assign_Backend() added
......
......@@ -453,20 +453,17 @@ event_load(VRT_CTX, struct vmod_priv *priv)
priv->priv = priv_vcl;
priv->methods = priv_vcl_methods;
VRT_AddVFP(ctx, &xyzzy_vfp_rot13);
VRT_AddVDP(ctx, &xyzzy_vdp_rot13);
AZ(VRT_AddFilter(ctx, &xyzzy_vfp_rot13, &xyzzy_vdp_rot13));
// This should fail
AN(VRT_AddFilter(ctx, &xyzzy_vfp_rot13, &xyzzy_vdp_rot13));
// Reset the error, we know what we're doing.
*ctx->handling = 0;
VRT_RemoveVFP(ctx, &xyzzy_vfp_rot13);
VRT_RemoveVDP(ctx, &xyzzy_vdp_rot13);
VRT_RemoveFilter(ctx, &xyzzy_vfp_rot13, &xyzzy_vdp_rot13);
AZ(VRT_AddFilter(ctx, &xyzzy_vfp_rot13, &xyzzy_vdp_rot13));
VRT_AddVDP(ctx, &xyzzy_vdp_pedantic);
VRT_AddFilter(ctx, NULL, &xyzzy_vdp_pedantic);
return (0);
}
......@@ -629,7 +626,7 @@ event_discard(VRT_CTX, void *priv)
AZ(ctx->msg);
VRT_RemoveFilter(ctx, &xyzzy_vfp_rot13, &xyzzy_vdp_rot13);
VRT_RemoveVDP(ctx, &xyzzy_vdp_pedantic);
VRT_RemoveFilter(ctx, NULL, &xyzzy_vdp_pedantic);
if (--loads)
return (0);
......
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