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
c6b4d181
Commit
c6b4d181
authored
Jun 29, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the records static in the VSLQ_dispatch_f() api
Use the and mark __match_proto__() the typedef where applicable.
parent
f2336782
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
27 deletions
+26
-27
vtc_logexp.c
bin/varnishtest/vtc_logexp.c
+4
-4
vsl.h
include/vapi/vsl.h
+17
-19
vsl.c
lib/libvarnishapi/vsl.c
+4
-4
vsl_cursor.c
lib/libvarnishapi/vsl_cursor.c
+1
-0
No files found.
bin/varnishtest/vtc_logexp.c
View file @
c6b4d181
...
...
@@ -57,7 +57,6 @@
#include "vapi/vsl.h"
#include "vtim.h"
#include "vqueue.h"
#include "miniobj.h"
#include "vas.h"
#include "vre.h"
...
...
@@ -176,8 +175,9 @@ logexp_next(struct logexp *le)
vtc_log
(
le
->
vl
,
3
,
"tst| %s"
,
VSB_data
(
le
->
test
->
str
));
}
static
int
logexp_dispatch
(
struct
VSL_data
*
vsl
,
struct
VSL_transaction
*
pt
[],
void
*
priv
)
static
int
__match_proto__
(
VSLQ_dispatch_f
)
logexp_dispatch
(
struct
VSL_data
*
vsl
,
struct
VSL_transaction
*
const
pt
[],
void
*
priv
)
{
struct
logexp
*
le
;
struct
VSL_transaction
*
t
;
...
...
@@ -275,7 +275,7 @@ logexp_thread(void *priv)
AZ
(
le
->
test
);
logexp_next
(
le
);
while
(
le
->
test
)
{
i
=
VSLQ_Dispatch
(
le
->
vslq
,
&
logexp_dispatch
,
le
);
i
=
VSLQ_Dispatch
(
le
->
vslq
,
logexp_dispatch
,
le
);
if
(
i
<
0
)
vtc_log
(
le
->
vl
,
0
,
"dispatch: %d"
,
i
);
if
(
i
==
0
&&
le
->
test
)
...
...
include/vapi/vsl.h
View file @
c6b4d181
...
...
@@ -84,6 +84,21 @@ enum VSL_grouping_e {
VSL_g_session
,
};
typedef
int
VSLQ_dispatch_f
(
struct
VSL_data
*
vsl
,
struct
VSL_transaction
*
const
trans
[],
void
*
priv
);
/*
* The callback function type for use with VSLQ_Dispatch.
*
* Arguments:
* vsl: The VSL_data context
* trans[]: A NULL terminated array of pointers to VSL_transaction.
* priv: The priv argument from VSL_Dispatch
*
* Return value:
* 0: OK - continue
* !=0: Makes VSLQ_Dispatch return with this return value immediatly
*/
extern
const
char
*
VSL_tags
[
256
];
/*
* Tag to string array. Contains NULL for invalid tags.
...
...
@@ -260,8 +275,7 @@ int VSL_PrintAll(struct VSL_data *vsl, struct VSL_cursor *c, void *fo);
* !=0: Return value from either VSL_Next or VSL_Print
*/
int
VSL_PrintTransactions
(
struct
VSL_data
*
vsl
,
struct
VSL_transaction
*
ptrans
[],
void
*
fo
);
VSLQ_dispatch_f
VSL_PrintTransactions
;
/*
* Prints out each transaction in the array ptrans. For
* transactions of level > 0 it will print a header before the log
...
...
@@ -316,8 +330,7 @@ int VSL_WriteAll(struct VSL_data *vsl, struct VSL_cursor *c, void *fo);
* !=0: Return value from either VSL_Next or VSL_Write
*/
int
VSL_WriteTransactions
(
struct
VSL_data
*
vsl
,
struct
VSL_transaction
*
ptrans
[],
void
*
fo
);
VSLQ_dispatch_f
VSL_WriteTransactions
;
/*
* Write all transactions in ptrans using VSL_WriteAll
* Return values:
...
...
@@ -347,21 +360,6 @@ void VSLQ_Delete(struct VSLQ **pvslq);
* Delete the query pointed to by pvslq, freeing up the resources
*/
typedef
int
VSLQ_dispatch_f
(
struct
VSL_data
*
vsl
,
struct
VSL_transaction
*
trans
[],
void
*
priv
);
/*
* The callback function type for use with VSLQ_Dispatch.
*
* Arguments:
* vsl: The VSL_data context
* trans[]: A NULL terminated array of pointers to VSL_transaction.
* priv: The priv argument from VSL_Dispatch
*
* Return value:
* 0: OK - continue
* !=0: Makes VSLQ_Dispatch return with this return value immediatly
*/
int
VSLQ_Dispatch
(
struct
VSLQ
*
vslq
,
VSLQ_dispatch_f
*
func
,
void
*
priv
);
/*
* Process log and call func for each set matching the specified
...
...
lib/libvarnishapi/vsl.c
View file @
c6b4d181
...
...
@@ -307,8 +307,8 @@ VSL_PrintAll(struct VSL_data *vsl, struct VSL_cursor *c, void *fo)
}
}
int
VSL_PrintTransactions
(
struct
VSL_data
*
vsl
,
struct
VSL_transaction
*
pt
[],
int
__match_proto__
(
VSLQ_dispatch_f
)
VSL_PrintTransactions
(
struct
VSL_data
*
vsl
,
struct
VSL_transaction
*
const
pt
[],
void
*
fo
)
{
struct
VSL_transaction
*
t
;
...
...
@@ -425,8 +425,8 @@ VSL_WriteAll(struct VSL_data *vsl, struct VSL_cursor *c, void *fo)
}
}
int
VSL_WriteTransactions
(
struct
VSL_data
*
vsl
,
struct
VSL_transaction
*
pt
[],
int
__match_proto__
(
VSLQ_dispatch_f
)
VSL_WriteTransactions
(
struct
VSL_data
*
vsl
,
struct
VSL_transaction
*
const
pt
[],
void
*
fo
)
{
struct
VSL_transaction
*
t
;
...
...
lib/libvarnishapi/vsl_cursor.c
View file @
c6b4d181
...
...
@@ -270,6 +270,7 @@ VSL_CursorVSM(struct VSL_data *vsl, struct VSM_data *vsm, int tail)
}
else
AZ
(
vslc_vsm_reset
(
&
c
->
c
));
/* XXX: How does 'c' ever get freed ? */
return
(
&
c
->
c
.
c
);
}
...
...
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