Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
aa7295e5
Commit
aa7295e5
authored
May 06, 2019
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move VRT_Vmod_{Init|Unload} To VPI
Relevant to #2800
parent
a2bb3507
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
9 deletions
+12
-9
cache_vrt_vmod.c
bin/varnishd/cache/cache_vrt_vmod.c
+3
-2
vcc_interface.h
include/vcc_interface.h
+5
-0
vrt.h
include/vrt.h
+2
-5
vcc_vmod.c
lib/libvcc/vcc_vmod.c
+2
-2
No files found.
bin/varnishd/cache/cache_vrt_vmod.c
View file @
aa7295e5
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
#include <stdlib.h>
#include <stdlib.h>
#include "vcli_serve.h"
#include "vcli_serve.h"
#include "vcc_interface.h"
#include "vmod_abi.h"
#include "vmod_abi.h"
/*--------------------------------------------------------------------
/*--------------------------------------------------------------------
...
@@ -78,7 +79,7 @@ vmod_abi_mismatch(const struct vmod_data *d)
...
@@ -78,7 +79,7 @@ vmod_abi_mismatch(const struct vmod_data *d)
}
}
int
int
V
RT
_Vmod_Init
(
VRT_CTX
,
struct
vmod
**
hdl
,
unsigned
nbr
,
void
*
ptr
,
int
len
,
V
PI
_Vmod_Init
(
VRT_CTX
,
struct
vmod
**
hdl
,
unsigned
nbr
,
void
*
ptr
,
int
len
,
const
char
*
nm
,
const
char
*
path
,
const
char
*
file_id
,
const
char
*
backup
)
const
char
*
nm
,
const
char
*
path
,
const
char
*
file_id
,
const
char
*
backup
)
{
{
struct
vmod
*
v
;
struct
vmod
*
v
;
...
@@ -162,7 +163,7 @@ VRT_Vmod_Init(VRT_CTX, struct vmod **hdl, unsigned nbr, void *ptr, int len,
...
@@ -162,7 +163,7 @@ VRT_Vmod_Init(VRT_CTX, struct vmod **hdl, unsigned nbr, void *ptr, int len,
}
}
void
void
V
RT
_Vmod_Unload
(
VRT_CTX
,
struct
vmod
**
hdl
)
V
PI
_Vmod_Unload
(
VRT_CTX
,
struct
vmod
**
hdl
)
{
{
struct
vmod
*
v
;
struct
vmod
*
v
;
...
...
include/vcc_interface.h
View file @
aa7295e5
...
@@ -50,3 +50,8 @@ struct vpi_ref {
...
@@ -50,3 +50,8 @@ struct vpi_ref {
};
};
void
VPI_count
(
VRT_CTX
,
unsigned
);
void
VPI_count
(
VRT_CTX
,
unsigned
);
int
VPI_Vmod_Init
(
VRT_CTX
,
struct
vmod
**
hdl
,
unsigned
nbr
,
void
*
ptr
,
int
len
,
const
char
*
nm
,
const
char
*
path
,
const
char
*
file_id
,
const
char
*
backup
);
void
VPI_Vmod_Unload
(
VRT_CTX
,
struct
vmod
**
hdl
);
include/vrt.h
View file @
aa7295e5
...
@@ -52,6 +52,8 @@
...
@@ -52,6 +52,8 @@
* binary/load-time compatible, increment MAJOR version
* binary/load-time compatible, increment MAJOR version
*
*
* unreleased (planned for 2019-09-15)
* unreleased (planned for 2019-09-15)
* VRT_Vmod_{Init|Unload} moved to vcc_interface.h
* VRT_count moved to vcc_interface.h
* VRT_VCL_Busy() and VRT_VCL_Unbusy() added.
* VRT_VCL_Busy() and VRT_VCL_Unbusy() added.
* VRT_vcl_get moved to vcc_interface.h
* VRT_vcl_get moved to vcc_interface.h
* VRT_vcl_rel emoved to vcc_interface.h
* VRT_vcl_rel emoved to vcc_interface.h
...
@@ -511,11 +513,6 @@ void VRT_DelDirector(VCL_BACKEND *);
...
@@ -511,11 +513,6 @@ void VRT_DelDirector(VCL_BACKEND *);
/* Suckaddr related */
/* Suckaddr related */
int
VRT_VSA_GetPtr
(
VCL_IP
sua
,
const
unsigned
char
**
dst
);
int
VRT_VSA_GetPtr
(
VCL_IP
sua
,
const
unsigned
char
**
dst
);
/* VMOD/Modules related */
int
VRT_Vmod_Init
(
VRT_CTX
,
struct
vmod
**
hdl
,
unsigned
nbr
,
void
*
ptr
,
int
len
,
const
char
*
nm
,
const
char
*
path
,
const
char
*
file_id
,
const
char
*
backup
);
void
VRT_Vmod_Unload
(
VRT_CTX
,
struct
vmod
**
hdl
);
typedef
int
vmod_event_f
(
VRT_CTX
,
struct
vmod_priv
*
,
enum
vcl_event_e
);
typedef
int
vmod_event_f
(
VRT_CTX
,
struct
vmod_priv
*
,
enum
vcl_event_e
);
typedef
void
vmod_priv_free_f
(
void
*
);
typedef
void
vmod_priv_free_f
(
void
*
);
...
...
lib/libvcc/vcc_vmod.c
View file @
aa7295e5
...
@@ -303,7 +303,7 @@ vcc_ParseImport(struct vcc *tl)
...
@@ -303,7 +303,7 @@ vcc_ParseImport(struct vcc *tl)
ifp
=
New_IniFin
(
tl
);
ifp
=
New_IniFin
(
tl
);
VSB_printf
(
ifp
->
ini
,
"
\t
if (V
RT
_Vmod_Init(ctx,
\n
"
);
VSB_printf
(
ifp
->
ini
,
"
\t
if (V
PI
_Vmod_Init(ctx,
\n
"
);
VSB_printf
(
ifp
->
ini
,
"
\t
&VGC_vmod_%.*s,
\n
"
,
PF
(
mod
));
VSB_printf
(
ifp
->
ini
,
"
\t
&VGC_vmod_%.*s,
\n
"
,
PF
(
mod
));
VSB_printf
(
ifp
->
ini
,
"
\t
%u,
\n
"
,
tl
->
vmod_count
++
);
VSB_printf
(
ifp
->
ini
,
"
\t
%u,
\n
"
,
tl
->
vmod_count
++
);
VSB_printf
(
ifp
->
ini
,
"
\t
&%s,
\n
"
,
vmd
->
func_name
);
VSB_printf
(
ifp
->
ini
,
"
\t
&%s,
\n
"
,
vmd
->
func_name
);
...
@@ -326,7 +326,7 @@ vcc_ParseImport(struct vcc *tl)
...
@@ -326,7 +326,7 @@ vcc_ParseImport(struct vcc *tl)
/* XXX: zero the function pointer structure ?*/
/* XXX: zero the function pointer structure ?*/
VSB_printf
(
ifp
->
fin
,
"
\t\t
VRT_priv_fini(&vmod_priv_%.*s);"
,
PF
(
mod
));
VSB_printf
(
ifp
->
fin
,
"
\t\t
VRT_priv_fini(&vmod_priv_%.*s);"
,
PF
(
mod
));
VSB_printf
(
ifp
->
final
,
VSB_printf
(
ifp
->
final
,
"
\t\t
V
RT
_Vmod_Unload(ctx, &VGC_vmod_%.*s);"
,
PF
(
mod
));
"
\t\t
V
PI
_Vmod_Unload(ctx, &VGC_vmod_%.*s);"
,
PF
(
mod
));
vj
=
vjsn_parse
(
vmd
->
json
,
&
p
);
vj
=
vjsn_parse
(
vmd
->
json
,
&
p
);
XXXAZ
(
p
);
XXXAZ
(
p
);
...
...
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