Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-backend_dyn
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
Carl P. Corliss
libvmod-backend_dyn
Commits
b4281001
Commit
b4281001
authored
Nov 25, 2015
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove start_probe() and stop_probe() from the interface
parent
52a17692
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
52 deletions
+12
-52
vmod.c
src/vmod.c
+12
-48
vmod.vcc
src/vmod.vcc
+0
-4
No files found.
src/vmod.c
View file @
b4281001
...
...
@@ -265,28 +265,6 @@ vmod_by_name(VRT_CTX, struct vmod_priv *priv, VCL_STRING name)
return
NULL
;
}
static
inline
struct
backend
*
check_and_get_backend
(
VRT_CTX
,
VCL_BACKEND
be
)
{
struct
backend
*
backend
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
CHECK_OBJ_NOTNULL
(
be
,
DIRECTOR_MAGIC
);
if
(
be
->
priv
==
NULL
)
{
errmsg
(
ctx
,
"vmod backend_dyn error: %s is not a leaf backend"
,
be
->
vcl_name
);
return
NULL
;
}
backend
=
(
struct
backend
*
)
be
->
priv
;
if
(
backend
->
magic
!=
BACKEND_MAGIC
)
{
errmsg
(
ctx
,
"vmod backend_dyn error: "
"%s is not a standard backend"
,
be
->
vcl_name
);
return
NULL
;
}
return
backend
;
}
VCL_BOOL
vmod_delete
(
VRT_CTX
,
struct
vmod_priv
*
priv
,
VCL_BACKEND
be
)
{
...
...
@@ -295,14 +273,24 @@ vmod_delete(VRT_CTX, struct vmod_priv *priv, VCL_BACKEND be)
struct
bentry
*
bentry
;
const
struct
director
*
dir
=
NULL
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
AN
(
priv
);
if
(
priv
->
priv
==
NULL
)
return
0
;
if
(
be
==
NULL
)
return
0
;
backend
=
check_and_get_backend
(
ctx
,
be
);
if
(
backend
==
NULL
)
CHECK_OBJ
(
be
,
DIRECTOR_MAGIC
);
if
(
be
->
priv
==
NULL
)
{
errmsg
(
ctx
,
"vmod backend_dyn error: %s is not a leaf backend"
,
be
->
vcl_name
);
return
0
;
}
backend
=
(
struct
backend
*
)
be
->
priv
;
if
(
backend
->
magic
!=
BACKEND_MAGIC
)
{
errmsg
(
ctx
,
"vmod backend_dyn error: "
"%s is not a standard backend"
,
be
->
vcl_name
);
return
0
;
}
CAST_OBJ
(
belist
,
priv
->
priv
,
BELIST_MAGIC
);
AN
(
belist
->
behead
);
...
...
@@ -322,30 +310,6 @@ vmod_delete(VRT_CTX, struct vmod_priv *priv, VCL_BACKEND be)
return
1
;
}
static
VCL_BOOL
control_probe
(
VRT_CTX
,
VCL_BACKEND
be
,
int
stop
)
{
struct
backend
*
backend
;
backend
=
check_and_get_backend
(
ctx
,
be
);
if
(
backend
==
NULL
)
return
0
;
VBP_Control
(
backend
,
stop
);
return
1
;
}
VCL_BOOL
vmod_stop_probe
(
VRT_CTX
,
VCL_BACKEND
be
)
{
return
(
control_probe
(
ctx
,
be
,
1
));
}
VCL_BOOL
vmod_start_probe
(
VRT_CTX
,
VCL_BACKEND
be
)
{
return
(
control_probe
(
ctx
,
be
,
0
));
}
VCL_STRING
vmod_version
(
VRT_CTX
__attribute__
((
unused
)))
{
...
...
src/vmod.vcc
View file @
b4281001
...
...
@@ -25,8 +25,4 @@ $Function BACKEND by_name(PRIV_VCL, STRING name)
$Function BOOL delete(PRIV_VCL, BACKEND be)
$Function BOOL stop_probe(BACKEND be)
$Function BOOL start_probe(BACKEND be)
$Function STRING version()
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