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
c217f497
Commit
c217f497
authored
Apr 16, 2015
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turn cli write failuers into vtc_log(0) rather than asserts
parent
96d556a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
vtc_varnish.c
bin/varnishtest/vtc_varnish.c
+7
-2
No files found.
bin/varnishtest/vtc_varnish.c
View file @
c217f497
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
#include <sys/socket.h>
#include <sys/socket.h>
#include <sys/resource.h>
#include <sys/resource.h>
#include <errno.h>
#include <fcntl.h>
#include <fcntl.h>
#include <inttypes.h>
#include <inttypes.h>
#include <poll.h>
#include <poll.h>
...
@@ -96,9 +97,13 @@ varnish_ask_cli(const struct varnish *v, const char *cmd, char **repl)
...
@@ -96,9 +97,13 @@ varnish_ask_cli(const struct varnish *v, const char *cmd, char **repl)
if
(
cmd
!=
NULL
)
{
if
(
cmd
!=
NULL
)
{
vtc_dump
(
v
->
vl
,
4
,
"CLI TX"
,
cmd
,
-
1
);
vtc_dump
(
v
->
vl
,
4
,
"CLI TX"
,
cmd
,
-
1
);
i
=
write
(
v
->
cli_fd
,
cmd
,
strlen
(
cmd
));
i
=
write
(
v
->
cli_fd
,
cmd
,
strlen
(
cmd
));
assert
(
i
==
strlen
(
cmd
));
if
(
i
!=
strlen
(
cmd
))
vtc_log
(
v
->
vl
,
0
,
"CLI write failed (%s) = %u %s"
,
cmd
,
errno
,
strerror
(
errno
));
i
=
write
(
v
->
cli_fd
,
"
\n
"
,
1
);
i
=
write
(
v
->
cli_fd
,
"
\n
"
,
1
);
assert
(
i
==
1
);
if
(
i
!=
1
)
vtc_log
(
v
->
vl
,
0
,
"CLI write failed (%s) = %u %s"
,
cmd
,
errno
,
strerror
(
errno
));
}
}
i
=
VCLI_ReadResult
(
v
->
cli_fd
,
&
retval
,
&
r
,
30
.
0
);
i
=
VCLI_ReadResult
(
v
->
cli_fd
,
&
retval
,
&
r
,
30
.
0
);
if
(
i
!=
0
)
{
if
(
i
!=
0
)
{
...
...
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