Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-cluster
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-cluster
Commits
566dcf4c
Commit
566dcf4c
authored
Mar 20, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move VRT_DirectorResolve to vmod_compat.h
parent
2dc864c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
23 deletions
+24
-23
vmod_cluster.c
src/vmod_cluster.c
+0
-23
vmod_compat.h
src/vmod_compat.h
+24
-0
No files found.
src/vmod_cluster.c
View file @
566dcf4c
...
...
@@ -38,29 +38,6 @@
#include "vcc_cluster_if.h"
#include "vmod_compat.h"
/* ------------------------------------------------------------
* workaround missing VRT_DirectorResolve
* Ref https://github.com/varnishcache/varnish-cache/pull/2680
*/
#if ! HAVE_DECL_VRT_DIRECTORRESOLVE
#include <cache/cache_director.h>
static
VCL_BACKEND
VRT_DirectorResolve
(
VRT_CTX
,
VCL_BACKEND
d
)
{
VCL_BACKEND
d2
;
for
(;
d
!=
NULL
&&
d
->
vdir
->
methods
->
resolve
!=
NULL
;
d
=
d2
)
{
CHECK_OBJ_NOTNULL
(
d
,
DIRECTOR_MAGIC
);
AN
(
d
->
vdir
);
d2
=
d
->
vdir
->
methods
->
resolve
(
ctx
,
d
);
}
CHECK_OBJ_ORNULL
(
d
,
DIRECTOR_MAGIC
);
if
(
d
!=
NULL
)
AN
(
d
->
vdir
);
return
(
d
);
}
#endif
/* ------------------------------------------------------------
*/
...
...
src/vmod_compat.h
View file @
566dcf4c
...
...
@@ -7,3 +7,27 @@
#ifndef VARGS
#define VARGS(x) vmod_ ## x ## _arg
#endif
/* ------------------------------------------------------------
* workaround missing VRT_DirectorResolve
* Ref https://github.com/varnishcache/varnish-cache/pull/2680
*/
#if ! HAVE_DECL_VRT_DIRECTORRESOLVE
#include <cache/cache_director.h>
static
inline
VCL_BACKEND
VRT_DirectorResolve
(
VRT_CTX
,
VCL_BACKEND
d
)
{
VCL_BACKEND
d2
;
for
(;
d
!=
NULL
&&
d
->
vdir
->
methods
->
resolve
!=
NULL
;
d
=
d2
)
{
CHECK_OBJ_NOTNULL
(
d
,
DIRECTOR_MAGIC
);
AN
(
d
->
vdir
);
d2
=
d
->
vdir
->
methods
->
resolve
(
ctx
,
d
);
}
CHECK_OBJ_ORNULL
(
d
,
DIRECTOR_MAGIC
);
if
(
d
!=
NULL
)
AN
(
d
->
vdir
);
return
(
d
);
}
#endif
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