Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
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
unique-xids
Commits
80b3ecc0
Commit
80b3ecc0
authored
May 01, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make VRT_String() return a const char *
parent
c3f399ca
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
14 deletions
+19
-14
cache.h
bin/varnishd/cache/cache.h
+6
-2
cache_vrt.c
bin/varnishd/cache/cache_vrt.c
+9
-7
cache_vrt_var.c
bin/varnishd/cache/cache_vrt_var.c
+3
-3
vrt.h
include/vrt.h
+0
-1
vmod_debug.c
lib/libvmod_debug/vmod_debug.c
+1
-1
No files found.
bin/varnishd/cache/cache.h
View file @
80b3ecc0
...
...
@@ -638,7 +638,7 @@ struct req {
double
t_resp
;
struct
http_conn
htc
[
1
];
c
har
*
client_identity
;
c
onst
char
*
client_identity
;
/* HTTP request */
struct
http
*
http
;
...
...
@@ -1029,7 +1029,11 @@ const char *VCL_Method_Name(unsigned);
/* cache_vrt.c */
char
*
VRT_String
(
struct
ws
*
ws
,
const
char
*
h
,
const
char
*
p
,
va_list
ap
);
/*
* These prototypes go here, because we do not want to pollute vrt.h
* with va_list. VCC never generates direct calls to them.
*/
const
char
*
VRT_String
(
struct
ws
*
ws
,
const
char
*
h
,
const
char
*
p
,
va_list
ap
);
char
*
VRT_StringList
(
char
*
d
,
unsigned
dl
,
const
char
*
p
,
va_list
ap
);
void
ESI_Deliver
(
struct
req
*
);
...
...
bin/varnishd/cache/cache_vrt.c
View file @
80b3ecc0
...
...
@@ -116,11 +116,13 @@ vrt_selecthttp(const struct vrt_ctx *ctx, enum gethdr_e where)
hp
=
ctx
->
http_obj
;
break
;
default:
INCOMPL
(
);
WRONG
(
"vrt_selecthttp 'where' invalid"
);
}
return
(
hp
);
}
/*--------------------------------------------------------------------*/
char
*
VRT_GetHdr
(
const
struct
vrt_ctx
*
ctx
,
const
struct
gethdr_s
*
hs
)
{
...
...
@@ -136,7 +138,7 @@ VRT_GetHdr(const struct vrt_ctx *ctx, const struct gethdr_s *hs)
}
/*--------------------------------------------------------------------
*
XXX: Optimize the single element case ?
*
Collapse a STRING_LIST in the space provided, or return NULL
*/
char
*
...
...
@@ -163,10 +165,10 @@ VRT_StringList(char *d, unsigned dl, const char *p, va_list ap)
}
/*--------------------------------------------------------------------
*
XXX: Optimize the single element case ?
*
Copy and merge a STRING_LIST into a workspace.
*/
char
*
c
onst
c
har
*
VRT_String
(
struct
ws
*
ws
,
const
char
*
h
,
const
char
*
p
,
va_list
ap
)
{
char
*
b
,
*
e
;
...
...
@@ -196,14 +198,14 @@ VRT_String(struct ws *ws, const char *h, const char *p, va_list ap)
}
/*--------------------------------------------------------------------
*
Build a string on the reques
t workspace
*
Copy and merge a STRING_LIST on the curren
t workspace
*/
const
char
*
VRT_CollectString
(
const
struct
vrt_ctx
*
ctx
,
const
char
*
p
,
...)
{
va_list
ap
;
char
*
b
;
c
onst
c
har
*
b
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
CHECK_OBJ_NOTNULL
(
ctx
->
ws
,
WS_MAGIC
);
...
...
@@ -221,7 +223,7 @@ VRT_SetHdr(const struct vrt_ctx *ctx , const struct gethdr_s *hs,
{
struct
http
*
hp
;
va_list
ap
;
char
*
b
;
c
onst
c
har
*
b
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
AN
(
hs
);
...
...
bin/varnishd/cache/cache_vrt_var.c
View file @
80b3ecc0
...
...
@@ -50,7 +50,7 @@ static void
vrt_do_string
(
const
struct
http
*
hp
,
int
fld
,
const
char
*
err
,
const
char
*
p
,
va_list
ap
)
{
char
*
b
;
c
onst
c
har
*
b
;
AN
(
hp
);
b
=
VRT_String
(
hp
->
ws
,
NULL
,
p
,
ap
);
...
...
@@ -165,7 +165,7 @@ void
VRT_l_client_identity
(
const
struct
vrt_ctx
*
ctx
,
const
char
*
str
,
...)
{
va_list
ap
;
char
*
b
;
c
onst
c
har
*
b
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
CHECK_OBJ_NOTNULL
(
ctx
->
req
,
REQ_MAGIC
);
...
...
@@ -248,7 +248,7 @@ void
VRT_l_beresp_storage
(
const
struct
vrt_ctx
*
ctx
,
const
char
*
str
,
...)
{
va_list
ap
;
char
*
b
;
c
onst
c
har
*
b
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
CHECK_OBJ_NOTNULL
(
ctx
->
bo
,
BUSYOBJ_MAGIC
);
...
...
include/vrt.h
View file @
80b3ecc0
...
...
@@ -260,5 +260,4 @@ char *VRT_REAL_string(const struct vrt_ctx *, double);
char
*
VRT_TIME_string
(
const
struct
vrt_ctx
*
,
double
);
const
char
*
VRT_BOOL_string
(
unsigned
);
const
char
*
VRT_BACKEND_string
(
const
struct
director
*
d
);
const
char
*
VRT_CollectString
(
const
struct
vrt_ctx
*
,
const
char
*
p
,
...);
lib/libvmod_debug/vmod_debug.c
View file @
80b3ecc0
...
...
@@ -39,7 +39,7 @@ VCL_VOID __match_proto__(td_debug_panic)
vmod_panic
(
const
struct
vrt_ctx
*
ctx
,
const
char
*
str
,
...)
{
va_list
ap
;
char
*
b
;
c
onst
c
har
*
b
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
va_start
(
ap
,
str
);
...
...
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