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
7cdb71aa
Commit
7cdb71aa
authored
Nov 02, 2017
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use $Prefix to avoid symbol clashes with libvmod_vtc
parent
0245af84
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
54 deletions
+55
-54
vmod.vcc
lib/libvmod_debug/vmod.vcc
+1
-0
vmod_debug.c
lib/libvmod_debug/vmod_debug.c
+25
-25
vmod_debug_dyn.c
lib/libvmod_debug/vmod_debug_dyn.c
+8
-8
vmod_debug_obj.c
lib/libvmod_debug/vmod_debug_obj.c
+21
-21
No files found.
lib/libvmod_debug/vmod.vcc
View file @
7cdb71aa
...
...
@@ -27,6 +27,7 @@
$Module debug 3 Development, test and debug
$ABI strict
$Prefix xyzzy
DESCRIPTION
===========
...
...
lib/libvmod_debug/vmod_debug.c
View file @
7cdb71aa
...
...
@@ -65,7 +65,7 @@ struct priv_vcl {
static
VCL_DURATION
vcl_release_delay
=
0
.
0
;
VCL_VOID
__match_proto__
(
td_debug_panic
)
vmod
_panic
(
VRT_CTX
,
const
char
*
str
,
...)
xyzzy
_panic
(
VRT_CTX
,
const
char
*
str
,
...)
{
va_list
ap
;
const
char
*
b
;
...
...
@@ -79,7 +79,7 @@ vmod_panic(VRT_CTX, const char *str, ...)
}
VCL_STRING
__match_proto__
(
td_debug_author
)
vmod
_author
(
VRT_CTX
,
VCL_ENUM
person
,
VCL_ENUM
someone
)
xyzzy
_author
(
VRT_CTX
,
VCL_ENUM
person
,
VCL_ENUM
someone
)
{
(
void
)
someone
;
...
...
@@ -96,7 +96,7 @@ vmod_author(VRT_CTX, VCL_ENUM person, VCL_ENUM someone)
}
VCL_VOID
__match_proto__
(
td_debug_test_priv_call
)
vmod
_test_priv_call
(
VRT_CTX
,
struct
vmod_priv
*
priv
)
xyzzy
_test_priv_call
(
VRT_CTX
,
struct
vmod_priv
*
priv
)
{
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
...
...
@@ -109,7 +109,7 @@ vmod_test_priv_call(VRT_CTX, struct vmod_priv *priv)
}
VCL_STRING
__match_proto__
(
td_debug_test_priv_task
)
vmod
_test_priv_task
(
VRT_CTX
,
struct
vmod_priv
*
priv
,
VCL_STRING
s
)
xyzzy
_test_priv_task
(
VRT_CTX
,
struct
vmod_priv
*
priv
,
VCL_STRING
s
)
{
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
...
...
@@ -131,7 +131,7 @@ vmod_test_priv_task(VRT_CTX, struct vmod_priv *priv, VCL_STRING s)
}
VCL_STRING
__match_proto__
(
td_debug_test_priv_top
)
vmod
_test_priv_top
(
VRT_CTX
,
struct
vmod_priv
*
priv
,
VCL_STRING
s
)
xyzzy
_test_priv_top
(
VRT_CTX
,
struct
vmod_priv
*
priv
,
VCL_STRING
s
)
{
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
...
...
@@ -143,7 +143,7 @@ vmod_test_priv_top(VRT_CTX, struct vmod_priv *priv, VCL_STRING s)
}
VCL_VOID
__match_proto__
(
td_debug_test_priv_vcl
)
vmod
_test_priv_vcl
(
VRT_CTX
,
struct
vmod_priv
*
priv
)
xyzzy
_test_priv_vcl
(
VRT_CTX
,
struct
vmod_priv
*
priv
)
{
struct
priv_vcl
*
priv_vcl
;
...
...
@@ -155,7 +155,7 @@ vmod_test_priv_vcl(VRT_CTX, struct vmod_priv *priv)
}
VCL_BACKEND
vmod
_no_backend
(
VRT_CTX
)
xyzzy
_no_backend
(
VRT_CTX
)
{
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
...
...
@@ -164,7 +164,7 @@ vmod_no_backend(VRT_CTX)
}
VCL_STEVEDORE
__match_proto__
(
td_debug_no_stevedore
)
vmod
_no_stevedore
(
VRT_CTX
)
xyzzy
_no_stevedore
(
VRT_CTX
)
{
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
...
...
@@ -173,7 +173,7 @@ vmod_no_stevedore(VRT_CTX)
}
VCL_VOID
__match_proto__
(
td_debug_rot52
)
vmod
_rot52
(
VRT_CTX
,
VCL_HTTP
hp
)
xyzzy
_rot52
(
VRT_CTX
,
VCL_HTTP
hp
)
{
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
...
...
@@ -183,7 +183,7 @@ vmod_rot52(VRT_CTX, VCL_HTTP hp)
}
VCL_STRING
__match_proto__
(
td_debug_argtest
)
vmod
_argtest
(
VRT_CTX
,
VCL_STRING
one
,
VCL_REAL
two
,
VCL_STRING
three
,
xyzzy
_argtest
(
VRT_CTX
,
VCL_STRING
one
,
VCL_REAL
two
,
VCL_STRING
three
,
VCL_STRING
comma
,
VCL_INT
four
)
{
char
buf
[
100
];
...
...
@@ -193,7 +193,7 @@ vmod_argtest(VRT_CTX, VCL_STRING one, VCL_REAL two, VCL_STRING three,
}
VCL_INT
__match_proto__
(
td_debug_vre_limit
)
vmod
_vre_limit
(
VRT_CTX
)
xyzzy
_vre_limit
(
VRT_CTX
)
{
(
void
)
ctx
;
return
(
cache_param
->
vre_limits
.
match
);
...
...
@@ -220,7 +220,7 @@ obj_cb(struct worker *wrk, void *priv, struct objcore *oc, unsigned event)
}
VCL_VOID
__match_proto__
(
td_debug_register_obj_events
)
vmod
_register_obj_events
(
VRT_CTX
,
struct
vmod_priv
*
priv
)
xyzzy
_register_obj_events
(
VRT_CTX
,
struct
vmod_priv
*
priv
)
{
struct
priv_vcl
*
priv_vcl
;
...
...
@@ -233,7 +233,7 @@ vmod_register_obj_events(VRT_CTX, struct vmod_priv *priv)
}
VCL_VOID
__match_proto__
(
td_debug_fail
)
vmod
_fail
(
VRT_CTX
)
xyzzy
_fail
(
VRT_CTX
)
{
VRT_fail
(
ctx
,
"Forced failure"
);
...
...
@@ -356,7 +356,7 @@ event_function(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e)
}
VCL_VOID
__match_proto__
(
td_debug_sleep
)
vmod
_sleep
(
VRT_CTX
,
VCL_DURATION
t
)
xyzzy
_sleep
(
VRT_CTX
,
VCL_DURATION
t
)
{
CHECK_OBJ_ORNULL
(
ctx
,
VRT_CTX_MAGIC
);
...
...
@@ -380,7 +380,7 @@ wsfind(VRT_CTX, VCL_ENUM which)
}
void
vmod
_workspace_allocate
(
VRT_CTX
,
VCL_ENUM
which
,
VCL_INT
size
)
xyzzy
_workspace_allocate
(
VRT_CTX
,
VCL_ENUM
which
,
VCL_INT
size
)
{
struct
ws
*
ws
;
char
*
s
;
...
...
@@ -407,7 +407,7 @@ vmod_workspace_allocate(VRT_CTX, VCL_ENUM which, VCL_INT size)
}
VCL_INT
vmod
_workspace_free
(
VRT_CTX
,
VCL_ENUM
which
)
xyzzy
_workspace_free
(
VRT_CTX
,
VCL_ENUM
which
)
{
struct
ws
*
ws
;
unsigned
u
;
...
...
@@ -425,7 +425,7 @@ vmod_workspace_free(VRT_CTX, VCL_ENUM which)
}
VCL_BOOL
vmod
_workspace_overflowed
(
VRT_CTX
,
VCL_ENUM
which
)
xyzzy
_workspace_overflowed
(
VRT_CTX
,
VCL_ENUM
which
)
{
struct
ws
*
ws
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
...
...
@@ -440,7 +440,7 @@ vmod_workspace_overflowed(VRT_CTX, VCL_ENUM which)
static
uintptr_t
debug_ws_snap
;
void
vmod
_workspace_snap
(
VRT_CTX
,
VCL_ENUM
which
)
xyzzy
_workspace_snap
(
VRT_CTX
,
VCL_ENUM
which
)
{
struct
ws
*
ws
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
...
...
@@ -453,7 +453,7 @@ vmod_workspace_snap(VRT_CTX, VCL_ENUM which)
}
void
vmod
_workspace_reset
(
VRT_CTX
,
VCL_ENUM
which
)
xyzzy
_workspace_reset
(
VRT_CTX
,
VCL_ENUM
which
)
{
struct
ws
*
ws
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
...
...
@@ -466,7 +466,7 @@ vmod_workspace_reset(VRT_CTX, VCL_ENUM which)
}
void
vmod
_workspace_overflow
(
VRT_CTX
,
VCL_ENUM
which
)
xyzzy
_workspace_overflow
(
VRT_CTX
,
VCL_ENUM
which
)
{
struct
ws
*
ws
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
...
...
@@ -479,7 +479,7 @@ vmod_workspace_overflow(VRT_CTX, VCL_ENUM which)
}
VCL_VOID
__match_proto__
(
td_debug_vcl_release_delay
)
vmod
_vcl_release_delay
(
VRT_CTX
,
VCL_DURATION
delay
)
xyzzy
_vcl_release_delay
(
VRT_CTX
,
VCL_DURATION
delay
)
{
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
...
...
@@ -488,7 +488,7 @@ vmod_vcl_release_delay(VRT_CTX, VCL_DURATION delay)
}
VCL_BOOL
__match_proto__
(
td_debug_match_acl
)
vmod
_match_acl
(
VRT_CTX
,
VCL_ACL
acl
,
VCL_IP
ip
)
xyzzy
_match_acl
(
VRT_CTX
,
VCL_ACL
acl
,
VCL_IP
ip
)
{
CHECK_OBJ_ORNULL
(
ctx
,
VRT_CTX_MAGIC
);
...
...
@@ -499,7 +499,7 @@ vmod_match_acl(VRT_CTX, VCL_ACL acl, VCL_IP ip)
}
VCL_BOOL
vmod
_barrier_sync
(
VRT_CTX
,
VCL_STRING
addr
)
xyzzy
_barrier_sync
(
VRT_CTX
,
VCL_STRING
addr
)
{
const
char
*
err
;
char
buf
[
32
];
...
...
@@ -532,7 +532,7 @@ vmod_barrier_sync(VRT_CTX, VCL_STRING addr)
}
VCL_VOID
__match_proto__
(
td_debug_test_probe
)
vmod
_test_probe
(
VRT_CTX
,
VCL_PROBE
probe
,
VCL_PROBE
same
)
xyzzy
_test_probe
(
VRT_CTX
,
VCL_PROBE
probe
,
VCL_PROBE
same
)
{
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
...
...
@@ -542,7 +542,7 @@ vmod_test_probe(VRT_CTX, VCL_PROBE probe, VCL_PROBE same)
}
VCL_INT
vmod
_typesize
(
VRT_CTX
,
VCL_STRING
s
)
xyzzy
_typesize
(
VRT_CTX
,
VCL_STRING
s
)
{
size_t
i
=
0
;
const
char
*
p
;
...
...
lib/libvmod_debug/vmod_debug_dyn.c
View file @
7cdb71aa
...
...
@@ -39,7 +39,7 @@
#include "vsa.h"
#include "vcc_if.h"
struct
vmod
_debug_dyn
{
struct
xyzzy
_debug_dyn
{
unsigned
magic
;
#define VMOD_DEBUG_DYN_MAGIC 0x9b77ccbd
pthread_mutex_t
mtx
;
...
...
@@ -48,7 +48,7 @@ struct vmod_debug_dyn {
};
static
void
dyn_dir_init
(
VRT_CTX
,
struct
vmod
_debug_dyn
*
dyn
,
dyn_dir_init
(
VRT_CTX
,
struct
xyzzy
_debug_dyn
*
dyn
,
VCL_STRING
addr
,
VCL_STRING
port
)
{
struct
addrinfo
hints
,
*
res
=
NULL
;
...
...
@@ -104,10 +104,10 @@ dyn_dir_init(VRT_CTX, struct vmod_debug_dyn *dyn,
}
VCL_VOID
vmod_dyn__init
(
VRT_CTX
,
struct
vmod
_debug_dyn
**
dynp
,
xyzzy_dyn__init
(
VRT_CTX
,
struct
xyzzy
_debug_dyn
**
dynp
,
const
char
*
vcl_name
,
VCL_STRING
addr
,
VCL_STRING
port
)
{
struct
vmod
_debug_dyn
*
dyn
;
struct
xyzzy
_debug_dyn
*
dyn
;
ASSERT_CLI
();
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
...
...
@@ -134,9 +134,9 @@ vmod_dyn__init(VRT_CTX, struct vmod_debug_dyn **dynp,
}
VCL_VOID
vmod_dyn__fini
(
struct
vmod
_debug_dyn
**
dynp
)
xyzzy_dyn__fini
(
struct
xyzzy
_debug_dyn
**
dynp
)
{
struct
vmod
_debug_dyn
*
dyn
;
struct
xyzzy
_debug_dyn
*
dyn
;
AN
(
dynp
);
if
(
*
dynp
==
NULL
)
...
...
@@ -151,7 +151,7 @@ vmod_dyn__fini(struct vmod_debug_dyn **dynp)
}
VCL_BACKEND
__match_proto__
()
vmod_dyn_backend
(
VRT_CTX
,
struct
vmod
_debug_dyn
*
dyn
)
xyzzy_dyn_backend
(
VRT_CTX
,
struct
xyzzy
_debug_dyn
*
dyn
)
{
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
CHECK_OBJ_NOTNULL
(
dyn
,
VMOD_DEBUG_DYN_MAGIC
);
...
...
@@ -160,7 +160,7 @@ vmod_dyn_backend(VRT_CTX, struct vmod_debug_dyn *dyn)
}
VCL_VOID
vmod_dyn_refresh
(
VRT_CTX
,
struct
vmod
_debug_dyn
*
dyn
,
xyzzy_dyn_refresh
(
VRT_CTX
,
struct
xyzzy
_debug_dyn
*
dyn
,
VCL_STRING
addr
,
VCL_STRING
port
)
{
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
...
...
lib/libvmod_debug/vmod_debug_obj.c
View file @
7cdb71aa
...
...
@@ -35,7 +35,7 @@
#include "vcc_if.h"
struct
vmod
_debug_obj
{
struct
xyzzy
_debug_obj
{
unsigned
magic
;
#define VMOD_DEBUG_OBJ_MAGIC 0xccbd9b77
int
foobar
;
...
...
@@ -43,10 +43,10 @@ struct vmod_debug_obj {
};
VCL_VOID
vmod_obj__init
(
VRT_CTX
,
struct
vmod
_debug_obj
**
op
,
xyzzy_obj__init
(
VRT_CTX
,
struct
xyzzy
_debug_obj
**
op
,
const
char
*
vcl_name
,
VCL_STRING
s
,
VCL_ENUM
e
)
{
struct
vmod
_debug_obj
*
o
;
struct
xyzzy
_debug_obj
*
o
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
(
void
)
vcl_name
;
...
...
@@ -62,7 +62,7 @@ vmod_obj__init(VRT_CTX, struct vmod_debug_obj **op,
}
VCL_VOID
vmod_obj__fini
(
struct
vmod
_debug_obj
**
op
)
xyzzy_obj__fini
(
struct
xyzzy
_debug_obj
**
op
)
{
AN
(
op
);
...
...
@@ -72,7 +72,7 @@ vmod_obj__fini(struct vmod_debug_obj **op)
}
VCL_VOID
__match_proto__
()
vmod_obj_enum
(
VRT_CTX
,
struct
vmod
_debug_obj
*
o
,
VCL_ENUM
e
)
xyzzy_obj_enum
(
VRT_CTX
,
struct
xyzzy
_debug_obj
*
o
,
VCL_ENUM
e
)
{
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
...
...
@@ -81,7 +81,7 @@ vmod_obj_enum(VRT_CTX, struct vmod_debug_obj *o, VCL_ENUM e)
}
VCL_STRING
__match_proto__
()
vmod_obj_foo
(
VRT_CTX
,
struct
vmod
_debug_obj
*
o
,
VCL_STRING
s
)
xyzzy_obj_foo
(
VRT_CTX
,
struct
xyzzy
_debug_obj
*
o
,
VCL_STRING
s
)
{
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
...
...
@@ -92,7 +92,7 @@ vmod_obj_foo(VRT_CTX, struct vmod_debug_obj *o, VCL_STRING s)
}
VCL_TIME
__match_proto__
()
vmod_obj_date
(
VRT_CTX
,
struct
vmod
_debug_obj
*
o
)
xyzzy_obj_date
(
VRT_CTX
,
struct
xyzzy
_debug_obj
*
o
)
{
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
...
...
@@ -102,7 +102,7 @@ vmod_obj_date(VRT_CTX, struct vmod_debug_obj *o)
}
VCL_STRING
__match_proto__
()
vmod_obj_string
(
VRT_CTX
,
struct
vmod
_debug_obj
*
o
)
xyzzy_obj_string
(
VRT_CTX
,
struct
xyzzy
_debug_obj
*
o
)
{
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
...
...
@@ -112,7 +112,7 @@ vmod_obj_string(VRT_CTX, struct vmod_debug_obj *o)
}
VCL_STRING
__match_proto__
()
vmod_obj_number
(
VRT_CTX
,
struct
vmod
_debug_obj
*
o
)
xyzzy_obj_number
(
VRT_CTX
,
struct
xyzzy
_debug_obj
*
o
)
{
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
...
...
@@ -122,30 +122,30 @@ vmod_obj_number(VRT_CTX, struct vmod_debug_obj *o)
}
VCL_VOID
__match_proto__
()
vmod
_obj_test_priv_call
(
VRT_CTX
,
struct
vmod
_debug_obj
*
o
,
struct
vmod_priv
*
priv
)
xyzzy
_obj_test_priv_call
(
VRT_CTX
,
struct
xyzzy
_debug_obj
*
o
,
struct
vmod_priv
*
priv
)
{
(
void
)
o
;
vmod
_test_priv_call
(
ctx
,
priv
);
xyzzy
_test_priv_call
(
ctx
,
priv
);
}
VCL_VOID
__match_proto__
()
vmod
_obj_test_priv_vcl
(
VRT_CTX
,
struct
vmod
_debug_obj
*
o
,
struct
vmod_priv
*
priv
)
xyzzy
_obj_test_priv_vcl
(
VRT_CTX
,
struct
xyzzy
_debug_obj
*
o
,
struct
vmod_priv
*
priv
)
{
(
void
)
o
;
vmod
_test_priv_vcl
(
ctx
,
priv
);
xyzzy
_test_priv_vcl
(
ctx
,
priv
);
}
VCL_STRING
__match_proto__
()
vmod
_obj_test_priv_task
(
VRT_CTX
,
struct
vmod
_debug_obj
*
o
,
struct
vmod_priv
*
priv
,
VCL_STRING
s
)
xyzzy
_obj_test_priv_task
(
VRT_CTX
,
struct
xyzzy
_debug_obj
*
o
,
struct
vmod_priv
*
priv
,
VCL_STRING
s
)
{
(
void
)
o
;
return
(
vmod
_test_priv_task
(
ctx
,
priv
,
s
));
return
(
xyzzy
_test_priv_task
(
ctx
,
priv
,
s
));
}
VCL_STRING
__match_proto__
()
vmod
_obj_test_priv_top
(
VRT_CTX
,
struct
vmod
_debug_obj
*
o
,
struct
vmod_priv
*
priv
,
VCL_STRING
s
)
xyzzy
_obj_test_priv_top
(
VRT_CTX
,
struct
xyzzy
_debug_obj
*
o
,
struct
vmod_priv
*
priv
,
VCL_STRING
s
)
{
(
void
)
o
;
return
(
vmod
_test_priv_top
(
ctx
,
priv
,
s
));
return
(
xyzzy
_test_priv_top
(
ctx
,
priv
,
s
));
}
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