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
041e8c81
Commit
041e8c81
authored
Nov 06, 2017
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change&Rename VCLS_PollFd() to take struct cli argument instead of fd.
parent
4aeb4f63
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
7 deletions
+9
-7
cache_cli.c
bin/varnishd/cache/cache_cli.c
+5
-2
mgt_cli.c
bin/varnishd/mgt/mgt_cli.c
+1
-2
vcli_serve.h
include/vcli_serve.h
+1
-1
vcli_serve.c
lib/libvarnish/vcli_serve.c
+2
-2
No files found.
bin/varnishd/cache/cache_cli.c
View file @
041e8c81
...
...
@@ -93,13 +93,16 @@ void
CLI_Run
(
void
)
{
int
i
;
struct
cli
*
cli
;
add_check
=
1
;
AN
(
VCLS_AddFd
(
cache_cls
,
heritage
.
cli_in
,
heritage
.
cli_out
,
NULL
,
NULL
));
cli
=
VCLS_AddFd
(
cache_cls
,
heritage
.
cli_in
,
heritage
.
cli_out
,
NULL
,
NULL
);
AN
(
cli
);
do
{
i
=
VCLS_Poll
Fd
(
cache_cls
,
heritage
.
cli_in
,
-
1
);
i
=
VCLS_Poll
(
cache_cls
,
cli
,
-
1
);
}
while
(
i
==
0
);
VSL
(
SLT_CLI
,
0
,
"EOF on CLI connection, worker stops"
);
}
...
...
bin/varnishd/mgt/mgt_cli.c
View file @
041e8c81
...
...
@@ -393,9 +393,8 @@ mgt_cli_callback2(const struct vev *e, int what)
{
int
i
;
(
void
)
e
;
(
void
)
what
;
i
=
VCLS_Poll
Fd
(
mgt_cls
,
e
->
fd
,
0
);
i
=
VCLS_Poll
(
mgt_cls
,
e
->
priv
,
0
);
return
(
i
);
}
...
...
include/vcli_serve.h
View file @
041e8c81
...
...
@@ -97,7 +97,7 @@ void VCLS_SetHooks(struct VCLS *, cls_cbc_f *, cls_cbc_f *);
struct
cli
*
VCLS_AddFd
(
struct
VCLS
*
cs
,
int
fdi
,
int
fdo
,
cls_cb_f
*
closefunc
,
void
*
priv
);
void
VCLS_AddFunc
(
struct
VCLS
*
cs
,
unsigned
auth
,
struct
cli_proto
*
clp
);
int
VCLS_Poll
Fd
(
struct
VCLS
*
cs
,
int
fd
,
int
timeout
);
int
VCLS_Poll
(
struct
VCLS
*
cs
,
const
struct
cli
*
,
int
timeout
);
void
VCLS_Destroy
(
struct
VCLS
**
);
/* From libvarnish/cli.c */
...
...
lib/libvarnish/vcli_serve.c
View file @
041e8c81
...
...
@@ -506,7 +506,7 @@ VCLS_AddFunc(struct VCLS *cs, unsigned auth, struct cli_proto *clp)
}
int
VCLS_Poll
Fd
(
struct
VCLS
*
cs
,
int
fd
,
int
timeout
)
VCLS_Poll
(
struct
VCLS
*
cs
,
const
struct
cli
*
cli
,
int
timeout
)
{
struct
VCLS_fd
*
cfd
;
struct
pollfd
pfd
[
1
];
...
...
@@ -521,7 +521,7 @@ VCLS_PollFd(struct VCLS *cs, int fd, int timeout)
i
=
0
;
VTAILQ_FOREACH
(
cfd
,
&
cs
->
fds
,
list
)
{
if
(
cfd
->
fdi
!=
fd
)
if
(
cfd
->
cli
!=
cli
)
continue
;
pfd
[
i
].
fd
=
cfd
->
fdi
;
pfd
[
i
].
events
=
POLLIN
;
...
...
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