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
469d65e0
Commit
469d65e0
authored
Jun 28, 2017
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VSM_Delete() -> VSM_Destroy() to follow our current OO schema.
parent
a0b34bd4
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
10 deletions
+16
-10
varnishadm.c
bin/varnishadm/varnishadm.c
+4
-4
vtc_logexp.c
bin/varnishtest/vtc_logexp.c
+1
-1
vtc_varnish.c
bin/varnishtest/vtc_varnish.c
+2
-2
vsm.h
include/vapi/vsm.h
+1
-1
libvarnishapi.map
lib/libvarnishapi/libvarnishapi.map
+1
-0
vsm.c
lib/libvarnishapi/vsm.c
+6
-1
vut.c
lib/libvarnishapi/vut.c
+1
-1
No files found.
bin/varnishadm/varnishadm.c
View file @
469d65e0
...
@@ -402,18 +402,18 @@ n_arg_sock(const char *n_arg)
...
@@ -402,18 +402,18 @@ n_arg_sock(const char *n_arg)
AN
(
vsm
);
AN
(
vsm
);
if
(
VSM_n_Arg
(
vsm
,
n_arg
)
<
0
)
{
if
(
VSM_n_Arg
(
vsm
,
n_arg
)
<
0
)
{
fprintf
(
stderr
,
"%s
\n
"
,
VSM_Error
(
vsm
));
fprintf
(
stderr
,
"%s
\n
"
,
VSM_Error
(
vsm
));
VSM_De
lete
(
vsm
);
VSM_De
stroy
(
&
vsm
);
return
(
-
1
);
return
(
-
1
);
}
}
if
(
VSM_Open
(
vsm
))
{
if
(
VSM_Open
(
vsm
))
{
fprintf
(
stderr
,
"%s
\n
"
,
VSM_Error
(
vsm
));
fprintf
(
stderr
,
"%s
\n
"
,
VSM_Error
(
vsm
));
VSM_De
lete
(
vsm
);
VSM_De
stroy
(
&
vsm
);
return
(
-
1
);
return
(
-
1
);
}
}
if
(
!
VSM_Get
(
vsm
,
&
vt
,
"Arg"
,
"-T"
))
{
if
(
!
VSM_Get
(
vsm
,
&
vt
,
"Arg"
,
"-T"
))
{
fprintf
(
stderr
,
"No -T arg in shared memory
\n
"
);
fprintf
(
stderr
,
"No -T arg in shared memory
\n
"
);
VSM_De
lete
(
vsm
);
VSM_De
stroy
(
&
vsm
);
return
(
-
1
);
return
(
-
1
);
}
}
AZ
(
VSM_Map
(
vsm
,
&
vt
));
AZ
(
VSM_Map
(
vsm
,
&
vt
));
...
@@ -426,7 +426,7 @@ n_arg_sock(const char *n_arg)
...
@@ -426,7 +426,7 @@ n_arg_sock(const char *n_arg)
S_arg
=
strdup
(
vt
.
b
);
S_arg
=
strdup
(
vt
.
b
);
}
}
VSM_De
lete
(
vsm
);
VSM_De
stroy
(
&
vsm
);
sock
=
-
1
;
sock
=
-
1
;
while
(
*
T_arg
)
{
while
(
*
T_arg
)
{
...
...
bin/varnishtest/vtc_logexp.c
View file @
469d65e0
...
@@ -192,7 +192,7 @@ logexp_delete(struct logexp *le)
...
@@ -192,7 +192,7 @@ logexp_delete(struct logexp *le)
logexp_delete_tests
(
le
);
logexp_delete_tests
(
le
);
free
(
le
->
name
);
free
(
le
->
name
);
free
(
le
->
query
);
free
(
le
->
query
);
VSM_De
lete
(
le
->
vsm
);
VSM_De
stroy
(
&
le
->
vsm
);
if
(
le
->
n_arg
)
if
(
le
->
n_arg
)
VSB_destroy
(
&
le
->
n_arg
);
VSB_destroy
(
&
le
->
n_arg
);
FREE_OBJ
(
le
);
FREE_OBJ
(
le
);
...
...
bin/varnishtest/vtc_varnish.c
View file @
469d65e0
...
@@ -276,7 +276,7 @@ varnishlog_thread(void *priv)
...
@@ -276,7 +276,7 @@ varnishlog_thread(void *priv)
if
(
c
)
if
(
c
)
VSL_DeleteCursor
(
c
);
VSL_DeleteCursor
(
c
);
VSL_Delete
(
vsl
);
VSL_Delete
(
vsl
);
VSM_De
lete
(
vsm
);
VSM_De
stroy
(
&
vsm
);
return
(
NULL
);
return
(
NULL
);
}
}
...
@@ -335,7 +335,7 @@ varnish_delete(struct varnish *v)
...
@@ -335,7 +335,7 @@ varnish_delete(struct varnish *v)
free
(
v
->
name
);
free
(
v
->
name
);
free
(
v
->
workdir
);
free
(
v
->
workdir
);
if
(
v
->
vd
!=
NULL
)
if
(
v
->
vd
!=
NULL
)
VSM_De
lete
(
v
->
vd
);
VSM_De
stroy
(
&
v
->
vd
);
/*
/*
* We do not delete the workdir, it may contain stuff people
* We do not delete the workdir, it may contain stuff people
...
...
include/vapi/vsm.h
View file @
469d65e0
...
@@ -70,7 +70,7 @@ struct vsm *VSM_New(void);
...
@@ -70,7 +70,7 @@ struct vsm *VSM_New(void);
* NULL: malloc failed.
* NULL: malloc failed.
*/
*/
void
VSM_De
lete
(
struct
vsm
*
vd
);
void
VSM_De
stroy
(
struct
vsm
*
*
vd
);
/*
/*
* Close and deallocate all storage and mappings.
* Close and deallocate all storage and mappings.
* (including any VSC and VSL "sub-classes")
* (including any VSC and VSL "sub-classes")
...
...
lib/libvarnishapi/libvarnishapi.map
View file @
469d65e0
...
@@ -182,6 +182,7 @@ LIBVARNISHAPI_1.7 {
...
@@ -182,6 +182,7 @@ LIBVARNISHAPI_1.7 {
VSM_invalid;
VSM_invalid;
VSM_valid;
VSM_valid;
VSM_similar;
VSM_similar;
VSM_Destroy;
VSM_Map;
VSM_Map;
VSM_Unmap;
VSM_Unmap;
VSC_Destroy_Point;
VSC_Destroy_Point;
...
...
lib/libvarnishapi/vsm.c
View file @
469d65e0
...
@@ -216,8 +216,13 @@ VSM_Name(const struct vsm *vd)
...
@@ -216,8 +216,13 @@ VSM_Name(const struct vsm *vd)
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/
void
void
VSM_De
lete
(
struct
vsm
*
vd
)
VSM_De
stroy
(
struct
vsm
**
vdp
)
{
{
struct
vsm
*
vd
;
AN
(
vdp
);
vd
=
*
vdp
;
*
vdp
=
NULL
;
CHECK_OBJ_NOTNULL
(
vd
,
VSM_MAGIC
);
CHECK_OBJ_NOTNULL
(
vd
,
VSM_MAGIC
);
...
...
lib/libvarnishapi/vut.c
View file @
469d65e0
...
@@ -336,7 +336,7 @@ VUT_Fini(void)
...
@@ -336,7 +336,7 @@ VUT_Fini(void)
if
(
VUT
.
vsl
)
if
(
VUT
.
vsl
)
VSL_Delete
(
VUT
.
vsl
);
VSL_Delete
(
VUT
.
vsl
);
if
(
VUT
.
vsm
)
if
(
VUT
.
vsm
)
VSM_De
lete
(
VUT
.
vsm
);
VSM_De
stroy
(
&
VUT
.
vsm
);
memset
(
&
VUT
,
0
,
sizeof
VUT
);
memset
(
&
VUT
,
0
,
sizeof
VUT
);
}
}
...
...
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