Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-weightadjust
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-weightadjust
Commits
ef475fa1
Commit
ef475fa1
authored
Mar 26, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update to 6.2
parent
cc0b38df
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
15 deletions
+6
-15
README.rst
README.rst
+1
-1
configure.ac
configure.ac
+1
-1
vmod_weightadjust.c
src/vmod_weightadjust.c
+4
-13
No files found.
README.rst
View file @
ef475fa1
...
...
@@ -2,7 +2,7 @@
vmod-weightadjust
============
This version is for varnish 6.
1
This version is for varnish 6.
2
SYNOPSIS
========
...
...
configure.ac
View file @
ef475fa1
...
...
@@ -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)"
...
...
src/vmod_weightadjust.c
View file @
ef475fa1
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment