Commit ef475fa1 authored by Nils Goroll's avatar Nils Goroll

update to 6.2

parent cc0b38df
......@@ -2,7 +2,7 @@
vmod-weightadjust
============
This version is for varnish 6.1
This version is for varnish 6.2
SYNOPSIS
========
......
......@@ -28,7 +28,7 @@ AC_ARG_WITH([rst2man],
m4_ifndef([VARNISH_PREREQ], AC_MSG_ERROR([Need varnish.m4 -- see README.rst]))
VARNISH_PREREQ([6.1])
VARNISH_PREREQ([6.2])
VARNISH_VMODS([weightadjust])
VMOD_TESTS="$(cd $srcdir/src && echo tests/*.vtc)"
......
......@@ -62,20 +62,13 @@
#include "vmod_weightadjust.h"
#include "wadj_thread.h"
#if 1
#define ERR(ctx, str) \
msg((ctx), 1, "vmod weightadjust error: " str)
#define VERR(ctx, fmt, ...) \
msg((ctx), 1, "vmod weightadjust error: " fmt, __VA_ARGS__)
#else
#define ERR(ctx, msg) \
VRT_fail((ctx), "vmod weightadjust error: " str)
VRT_fail((ctx), "vmod weightadjust error: " msg)
#define VERR(ctx, fmt, ...) \
VRT_fail((ctx), "vmod weightadjust error: " fmt, __VA_ARGS__)
#endif
static void
msg(VRT_CTX, int fail, const char *fmt, ...)
msg(VRT_CTX, const char *fmt, ...)
{
va_list args;
......@@ -83,8 +76,6 @@ msg(VRT_CTX, int fail, const char *fmt, ...)
if (ctx->method == VCL_MET_INIT) {
AN(ctx->msg);
VSB_vprintf(ctx->msg, fmt, args);
if (fail)
VRT_handling(ctx, VCL_RET_FAIL);
}
else if (ctx->vsl)
VSLbv(ctx->vsl, SLT_VCL_Error, fmt, args);
......@@ -108,7 +99,7 @@ priv_vcl_free(void *priv)
}
int
event_function(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e)
vmod_event_function(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e)
{
struct vmod_wadj_vcl *wa_vcl;
......@@ -268,7 +259,7 @@ vmod_random_add_backend(VRT_CTX, struct vmod_weightadjust_random *rr,
CAST_OBJ_NOTNULL(be, vcl_be->priv, BACKEND_MAGIC);
if (weight_update == NULL || weight_update[0] == '\0') {
msg(ctx, 0, "vmod weightadjust director %s "
msg(ctx, "vmod weightadjust director %s "
"add_backend(%s) without weight update falls back "
"to standard behaviour",
rr->vd->dir->vcl_name, vcl_be->vcl_name);
......
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