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
fe3f7e9f
Commit
fe3f7e9f
authored
Feb 29, 2024
by
Dridi Boukelmoune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vcli_proto: Use VTIM_poll_tmo()
parent
757e7195
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
vcli_proto.c
lib/libvarnish/vcli_proto.c
+3
-6
No files found.
lib/libvarnish/vcli_proto.c
View file @
fe3f7e9f
...
...
@@ -45,6 +45,7 @@
#include "vas.h" // XXX Flexelint "not used" - but req'ed for assert()
#include "vcli.h"
#include "vsha256.h"
#include "vtim.h"
void
VCLI_AuthResponse
(
int
S_fd
,
const
char
*
challenge
,
...
...
@@ -110,17 +111,13 @@ VCLI_WriteResult(int fd, unsigned status, const char *result)
static
int
read_tmo
(
int
fd
,
char
*
ptr
,
unsigned
len
,
double
tmo
)
{
int
i
,
j
,
to
;
int
i
,
j
;
struct
pollfd
pfd
;
if
(
tmo
>
0
)
to
=
(
int
)(
tmo
*
1e3
);
else
to
=
-
1
;
pfd
.
fd
=
fd
;
pfd
.
events
=
POLLIN
;
for
(
j
=
0
;
len
>
0
;
)
{
i
=
poll
(
&
pfd
,
1
,
to
);
i
=
poll
(
&
pfd
,
1
,
VTIM_poll_tmo
(
tmo
)
);
if
(
i
<
0
)
{
errno
=
EINTR
;
return
(
-
1
);
...
...
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