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
01001b90
Commit
01001b90
authored
Mar 11, 2015
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use VTCP_open() instead of VSS_open()
parent
194c0723
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
varnishadm.c
bin/varnishadm/varnishadm.c
+4
-3
vtc_client.c
bin/varnishtest/vtc_client.c
+4
-2
No files found.
bin/varnishadm/varnishadm.c
View file @
01001b90
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
#include "vas.h"
#include "vas.h"
#include "vcli.h"
#include "vcli.h"
#include "vnum.h"
#include "vnum.h"
#include "v
ss
.h"
#include "v
tcp
.h"
#define RL_EXIT(status) \
#define RL_EXIT(status) \
do { \
do { \
...
@@ -101,10 +101,11 @@ cli_sock(const char *T_arg, const char *S_arg)
...
@@ -101,10 +101,11 @@ cli_sock(const char *T_arg, const char *S_arg)
unsigned
status
;
unsigned
status
;
char
*
answer
=
NULL
;
char
*
answer
=
NULL
;
char
buf
[
CLI_AUTH_RESPONSE_LEN
+
1
];
char
buf
[
CLI_AUTH_RESPONSE_LEN
+
1
];
const
char
*
err
;
sock
=
V
SS_open
(
T_arg
,
timeout
);
sock
=
V
TCP_open
(
T_arg
,
NULL
,
timeout
,
&
err
);
if
(
sock
<
0
)
{
if
(
sock
<
0
)
{
fprintf
(
stderr
,
"Connection failed (%s)
\n
"
,
T_arg
);
fprintf
(
stderr
,
"Connection failed (%s)
: %s
\n
"
,
T_arg
,
err
);
return
(
-
1
);
return
(
-
1
);
}
}
...
...
bin/varnishtest/vtc_client.c
View file @
01001b90
...
@@ -74,6 +74,7 @@ client_thread(void *priv)
...
@@ -74,6 +74,7 @@ client_thread(void *priv)
struct
vsb
*
vsb
;
struct
vsb
*
vsb
;
char
*
p
;
char
*
p
;
char
mabuf
[
32
],
mpbuf
[
32
];
char
mabuf
[
32
],
mpbuf
[
32
];
const
char
*
err
;
CAST_OBJ_NOTNULL
(
c
,
priv
,
CLIENT_MAGIC
);
CAST_OBJ_NOTNULL
(
c
,
priv
,
CLIENT_MAGIC
);
AN
(
*
c
->
connect
);
AN
(
*
c
->
connect
);
...
@@ -91,9 +92,10 @@ client_thread(void *priv)
...
@@ -91,9 +92,10 @@ client_thread(void *priv)
vtc_log
(
vl
,
2
,
"Started (%u iterations)"
,
c
->
repeat
);
vtc_log
(
vl
,
2
,
"Started (%u iterations)"
,
c
->
repeat
);
for
(
u
=
0
;
u
<
c
->
repeat
;
u
++
)
{
for
(
u
=
0
;
u
<
c
->
repeat
;
u
++
)
{
vtc_log
(
vl
,
3
,
"Connect to %s"
,
VSB_data
(
vsb
));
vtc_log
(
vl
,
3
,
"Connect to %s"
,
VSB_data
(
vsb
));
fd
=
V
SS_open
(
VSB_data
(
vsb
),
10
.
);
fd
=
V
TCP_open
(
VSB_data
(
vsb
),
NULL
,
10
.,
&
err
);
if
(
fd
<
0
)
if
(
fd
<
0
)
vtc_log
(
c
->
vl
,
0
,
"Failed to open %s"
,
VSB_data
(
vsb
));
vtc_log
(
c
->
vl
,
0
,
"Failed to open %s: %s"
,
VSB_data
(
vsb
),
err
);
assert
(
fd
>=
0
);
assert
(
fd
>=
0
);
VTCP_blocking
(
fd
);
VTCP_blocking
(
fd
);
VTCP_myname
(
fd
,
mabuf
,
sizeof
mabuf
,
mpbuf
,
sizeof
mpbuf
);
VTCP_myname
(
fd
,
mabuf
,
sizeof
mabuf
,
mpbuf
,
sizeof
mpbuf
);
...
...
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