Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
varnishevent
Commits
1502b121
Commit
1502b121
authored
Apr 12, 2015
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add const qualifiers to some of the interfaces in format.c
parent
59b54d08
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
format.c
src/format.c
+5
-5
format.h
src/format.h
+4
-4
No files found.
src/format.c
View file @
1502b121
...
...
@@ -79,7 +79,7 @@ static int read_rx_hdr = 0, read_tx_hdr = 0, read_vcl_log = 0,
#endif
char
*
get_payload
(
logline_t
*
rec
)
get_payload
(
const
logline_t
*
rec
)
{
CHECK_OBJ_NOTNULL
(
rec
,
LOGLINE_MAGIC
);
...
...
@@ -111,7 +111,7 @@ get_payload(logline_t *rec)
* Return the *last* record in tx that matches the tag
*/
logline_t
*
get_tag
(
tx_t
*
tx
,
enum
VSL_tag_e
tag
)
get_tag
(
const
tx_t
*
tx
,
enum
VSL_tag_e
tag
)
{
logline_t
*
rec
,
*
tagrec
=
NULL
;
...
...
@@ -129,7 +129,7 @@ get_tag(tx_t *tx, enum VSL_tag_e tag)
* tag and the header name.
*/
char
*
get_hdr
(
tx_t
*
tx
,
enum
VSL_tag_e
tag
,
const
char
*
hdr
)
get_hdr
(
const
tx_t
*
tx
,
enum
VSL_tag_e
tag
,
const
char
*
hdr
)
{
logline_t
*
rec
;
char
*
hdr_payload
=
NULL
;
...
...
@@ -183,7 +183,7 @@ get_fld(char *str, int n, size_t *len)
}
char
*
get_rec_fld
(
logline_t
*
rec
,
int
n
,
size_t
*
len
)
get_rec_fld
(
const
logline_t
*
rec
,
int
n
,
size_t
*
len
)
{
return
get_fld
(
get_payload
(
rec
),
n
,
len
);
}
...
...
@@ -225,7 +225,7 @@ format_b_backend(tx_t *tx, char *name, enum VSL_tag_e tag, char **s,
static
inline
void
format_DT
(
tx_t
*
tx
,
const
char
*
ts
,
int
m
,
char
**
s
,
size_t
*
len
)
{
char
*
t
;
c
onst
c
har
*
t
;
double
d
;
char
*
f
=
get_hdr
(
tx
,
SLT_Timestamp
,
ts
);
...
...
src/format.h
View file @
1502b121
...
...
@@ -37,11 +37,11 @@ struct vsb *payload;
typedef
void
formatter_f
(
tx_t
*
tx
,
char
*
name
,
enum
VSL_tag_e
tag
,
char
**
s
,
size_t
*
len
);
char
*
get_payload
(
logline_t
*
rec
);
logline_t
*
get_tag
(
tx_t
*
tx
,
enum
VSL_tag_e
tag
);
char
*
get_hdr
(
tx_t
*
tx
,
enum
VSL_tag_e
tag
,
const
char
*
hdr
);
char
*
get_payload
(
const
logline_t
*
rec
);
logline_t
*
get_tag
(
const
tx_t
*
tx
,
enum
VSL_tag_e
tag
);
char
*
get_hdr
(
const
tx_t
*
tx
,
enum
VSL_tag_e
tag
,
const
char
*
hdr
);
char
*
get_fld
(
char
*
str
,
int
n
,
size_t
*
len
);
char
*
get_rec_fld
(
logline_t
*
rec
,
int
n
,
size_t
*
len
);
char
*
get_rec_fld
(
const
logline_t
*
rec
,
int
n
,
size_t
*
len
);
formatter_f
format_b_client
;
formatter_f
format_b_backend
;
...
...
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