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
1172fc93
Commit
1172fc93
authored
Jul 19, 2012
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Various minor cleanups for code clarity.
parent
c34f10e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
31 deletions
+11
-31
cache_center.c
bin/varnishd/cache/cache_center.c
+2
-8
cache_session.c
bin/varnishd/cache/cache_session.c
+9
-23
No files found.
bin/varnishd/cache/cache_center.c
View file @
1172fc93
...
...
@@ -175,8 +175,8 @@ cnt_wait(struct sess *sp, struct worker *wrk, struct req *req)
}
}
}
AZ
(
req
->
vcl
);
SES_ReleaseReq
(
req
);
assert
(
why
!=
SC_NULL
);
SES_Delete
(
sp
,
why
,
now
);
return
(
1
);
}
...
...
@@ -254,14 +254,8 @@ cnt_sess_done(struct sess *sp, struct worker *wrk, struct req *req)
req
->
hash_always_miss
=
0
;
req
->
hash_ignore_busy
=
0
;
if
(
sp
->
fd
>=
0
&&
req
->
doclose
!=
SC_NULL
)
{
/*
* This is an orderly close of the connection; ditch nolinger
* before we close, to get queued data transmitted.
*/
// XXX: not yet (void)VTCP_linger(sp->fd, 0);
if
(
sp
->
fd
>=
0
&&
req
->
doclose
!=
SC_NULL
)
SES_Close
(
sp
,
req
->
doclose
);
}
if
(
sp
->
fd
<
0
)
{
wrk
->
stats
.
sess_closed
++
;
...
...
bin/varnishd/cache/cache_session.c
View file @
1172fc93
...
...
@@ -133,12 +133,9 @@ static void
ses_req_pool_task
(
struct
worker
*
wrk
,
void
*
arg
)
{
struct
req
*
req
;
struct
sess
*
sp
;
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
CAST_OBJ_NOTNULL
(
req
,
arg
,
REQ_MAGIC
);
sp
=
req
->
sp
;
CHECK_OBJ_NOTNULL
(
sp
,
SESS_MAGIC
);
THR_SetRequest
(
req
);
AZ
(
wrk
->
aws
->
r
);
...
...
@@ -180,6 +177,9 @@ ses_sess_pool_task(struct worker *wrk, void *arg)
*
* We use VSL() to get the sessions vxid and to make sure tha this
* VSL comes before anything else for this session.
*
* This is a separate procedure only to isolate the two stack buffers.
*
*/
static
void
...
...
@@ -317,12 +317,7 @@ SES_Close(struct sess *sp, enum sess_close reason)
}
/*--------------------------------------------------------------------
* (Close &) Free or Recycle a session.
*
* If the workspace has changed, deleted it, otherwise wash it, and put
* it up for adoption.
*
* XXX: We should also check nhttp
* Report and dismantle a session.
*/
void
...
...
@@ -338,27 +333,18 @@ SES_Delete(struct sess *sp, enum sess_close reason, double now)
if
(
reason
!=
SC_NULL
)
SES_Close
(
sp
,
reason
);
assert
(
sp
->
fd
<
0
);
if
(
isnan
(
now
))
now
=
VTIM_real
();
assert
(
!
isnan
(
sp
->
t_open
));
assert
(
sp
->
fd
<
0
);
if
(
*
sp
->
addr
==
'\0'
)
strcpy
(
sp
->
addr
,
"-"
);
if
(
*
sp
->
port
==
'\0'
)
strcpy
(
sp
->
addr
,
"-"
);
b
=
&
sp
->
acct_ses
;
VSL
(
SLT_SessClose
,
sp
->
vxid
,
"%s %.3f %ju %ju %ju %ju %ju %ju"
,
sess_close_str
(
sp
->
reason
,
0
),
now
-
sp
->
t_open
,
b
->
req
,
b
->
pipe
,
b
->
pass
,
b
->
fetch
,
b
->
hdrbytes
,
b
->
bodybytes
);
VSL
(
SLT_SessClose
,
sp
->
vxid
,
"%s %.3f %ju %ju %ju %ju %ju %ju"
,
sess_close_str
(
sp
->
reason
,
0
),
now
-
sp
->
t_open
,
b
->
req
,
b
->
pipe
,
b
->
pass
,
b
->
fetch
,
b
->
hdrbytes
,
b
->
bodybytes
);
MPL_Free
(
pp
->
mpl_sess
,
sp
);
}
/*--------------------------------------------------------------------
...
...
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