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
931fa706
Commit
931fa706
authored
Apr 22, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move be*.status to use busyobj
parent
433e86f0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
27 deletions
+24
-27
cache_vrt_var.c
bin/varnishd/cache/cache_vrt_var.c
+23
-26
generate.py
lib/libvcl/generate.py
+1
-1
No files found.
bin/varnishd/cache/cache_vrt_var.c
View file @
931fa706
...
...
@@ -81,6 +81,24 @@ VRT_r_##obj##_##hdr(const struct CPAR *px) \
return (http->hd[fld].b); \
}
#define VRT_DO_STATUS(obj, http) \
void \
VRT_l_##obj##_status(const struct CPAR *px, long num) \
{ \
\
CHECK_OBJ_NOTNULL(px, CMAGIC); \
assert(num >= 100 && num <= 999); \
http->status = (uint16_t)num; \
} \
\
long \
VRT_r_##obj##_status(const struct CPAR *px) \
{ \
\
CHECK_OBJ_NOTNULL(px, CMAGIC); \
return(http->status); \
}
#define CPAR req
#define CMAGIC REQ_MAGIC
VRT_DO_HDR
(
req
,
method
,
px
->
http
,
HTTP_HDR_METHOD
)
...
...
@@ -89,9 +107,11 @@ VRT_DO_HDR(req, url, px->http, HTTP_HDR_URL)
VRT_DO_HDR
(
req
,
proto
,
px
->
http
,
HTTP_HDR_PROTO
)
VRT_DO_HDR
(
obj
,
proto
,
px
->
obj
->
http
,
HTTP_HDR_PROTO
)
VRT_DO_HDR
(
obj
,
response
,
px
->
obj
->
http
,
HTTP_HDR_RESPONSE
)
VRT_DO_STATUS
(
obj
,
px
->
obj
->
http
)
VRT_DO_HDR
(
resp
,
proto
,
px
->
resp
,
HTTP_HDR_PROTO
)
VRT_DO_HDR
(
resp
,
response
,
px
->
resp
,
HTTP_HDR_RESPONSE
)
#undef CPAR
VRT_DO_STATUS
(
resp
,
px
->
resp
)
#undef CPAR
#undef CMAGIC
#define CPAR busyobj
...
...
@@ -102,35 +122,12 @@ VRT_DO_HDR(bereq, url, px->bereq, HTTP_HDR_URL)
VRT_DO_HDR
(
bereq
,
proto
,
px
->
bereq
,
HTTP_HDR_PROTO
)
VRT_DO_HDR
(
beresp
,
proto
,
px
->
beresp
,
HTTP_HDR_PROTO
)
VRT_DO_HDR
(
beresp
,
response
,
px
->
beresp
,
HTTP_HDR_RESPONSE
)
#undef CPAR
VRT_DO_STATUS
(
beresp
,
px
->
beresp
)
#undef CPAR
#undef CMAGIC
/*--------------------------------------------------------------------*/
#define VRT_DO_STATUS(obj, http) \
void \
VRT_l_##obj##_status(const struct req *req, long num) \
{ \
\
CHECK_OBJ_NOTNULL(req, REQ_MAGIC); \
assert(num >= 100 && num <= 999); \
http->status = (uint16_t)num; \
} \
\
long \
VRT_r_##obj##_status(const struct req *req) \
{ \
\
CHECK_OBJ_NOTNULL(req, REQ_MAGIC); \
return(http->status); \
}
VRT_DO_STATUS
(
obj
,
req
->
obj
->
http
)
VRT_DO_STATUS
(
beresp
,
req
->
busyobj
->
beresp
)
VRT_DO_STATUS
(
resp
,
req
->
resp
)
/*--------------------------------------------------------------------*/
/* XXX: review this */
/* Add an objecthead to the saintmode list for the (hopefully) relevant
* backend. Some double-up asserting here to avoid assert-errors when there
...
...
lib/libvcl/generate.py
View file @
931fa706
...
...
@@ -301,7 +301,7 @@ sp_variables = (
'INT'
,
(
'backend_response'
,),
(
'backend_response'
,),
'c
R
'
'c
B
'
),
(
'beresp.response'
,
'STRING'
,
...
...
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