Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent3
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
varnishevent3
Commits
4ea9641f
Commit
4ea9641f
authored
Jun 02, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A zero timeout in the VCLI functions should mean "infinity".
This fixes "varnishadm -t 0"
parent
31a65a99
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
cli_common.c
lib/libvarnish/cli_common.c
+6
-2
No files found.
lib/libvarnish/cli_common.c
View file @
4ea9641f
...
@@ -118,13 +118,17 @@ VCLI_WriteResult(int fd, const struct cli *cli)
...
@@ -118,13 +118,17 @@ VCLI_WriteResult(int fd, const struct cli *cli)
static
int
static
int
read_tmo
(
int
fd
,
char
*
ptr
,
unsigned
len
,
double
tmo
)
read_tmo
(
int
fd
,
char
*
ptr
,
unsigned
len
,
double
tmo
)
{
{
int
i
,
j
;
int
i
,
j
,
to
;
struct
pollfd
pfd
;
struct
pollfd
pfd
;
if
(
tmo
>
0
)
to
=
tmo
*
1e3
;
else
to
=
-
1
;
pfd
.
fd
=
fd
;
pfd
.
fd
=
fd
;
pfd
.
events
=
POLLIN
;
pfd
.
events
=
POLLIN
;
for
(
j
=
0
;
len
>
0
;
)
{
for
(
j
=
0
;
len
>
0
;
)
{
i
=
poll
(
&
pfd
,
1
,
(
int
)(
tmo
*
1e3
)
);
i
=
poll
(
&
pfd
,
1
,
to
);
if
(
i
==
0
)
{
if
(
i
==
0
)
{
errno
=
ETIMEDOUT
;
errno
=
ETIMEDOUT
;
return
(
-
1
);
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