Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent3
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
varnishevent3
Commits
fde3c9b5
Commit
fde3c9b5
authored
Oct 07, 2013
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
varnishevent: cleanup in format.c
parent
05b93afe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
+21
-5
format.c
bin/varnishevent/format.c
+20
-5
varnishevent.h
bin/varnishevent/varnishevent.h
+1
-0
No files found.
bin/varnishevent/format.c
View file @
fde3c9b5
...
...
@@ -41,10 +41,6 @@
#include "miniobj.h"
#include "base64.h"
#define C(spec) ((spec) & VSL_S_CLIENT)
#define B(spec) ((spec) & VSL_S_BACKEND)
#define Z(spec) ((spec) == 0)
#define TAG(ll,t) ((ll)->tag[tag2idx[(t)]])
typedef
void
formatter_f
(
logline_t
*
ll
,
char
*
name
,
enum
VSL_tag_e
tag
,
...
...
@@ -910,9 +906,28 @@ FMT_Format(logline_t *ll, struct vsb *os)
}
}
static
void
free_format
(
compiled_fmt_t
*
fmt
)
{
for
(
int
i
;
i
<
fmt
->
n
;
i
++
)
{
free
(
fmt
->
str
[
i
]);
if
(
fmt
->
args
[
i
].
name
!=
NULL
)
free
(
fmt
->
args
[
i
].
name
);
}
free
(
fmt
->
str
);
free
(
fmt
->
formatter
);
free
(
fmt
->
args
);
}
void
FMT_Shutdown
(
void
)
{
/* XXX: remaining cleanup */
free
(
scratch
);
if
(
!
EMPTY
(
config
.
cformat
))
free_format
(
&
cformat
);
if
(
!
EMPTY
(
config
.
bformat
))
free_format
(
&
bformat
);
if
(
!
EMPTY
(
config
.
zformat
))
free_format
(
&
zformat
);
}
bin/varnishevent/varnishevent.h
View file @
fde3c9b5
...
...
@@ -42,6 +42,7 @@
#define C(spec) ((spec) & VSL_S_CLIENT)
#define B(spec) ((spec) & VSL_S_BACKEND)
#define Z(spec) ((spec) == 0)
/* Defaults from Varnish 3.0.3 */
#define DEFAULT_MAX_RECLEN 255
/* shm_reclen */
...
...
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