Commit 01001b90 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Use VTCP_open() instead of VSS_open()

parent 194c0723
......@@ -63,7 +63,7 @@
#include "vas.h"
#include "vcli.h"
#include "vnum.h"
#include "vss.h"
#include "vtcp.h"
#define RL_EXIT(status) \
do { \
......@@ -101,10 +101,11 @@ cli_sock(const char *T_arg, const char *S_arg)
unsigned status;
char *answer = NULL;
char buf[CLI_AUTH_RESPONSE_LEN + 1];
const char *err;
sock = VSS_open(T_arg, timeout);
sock = VTCP_open(T_arg, NULL, timeout, &err);
if (sock < 0) {
fprintf(stderr, "Connection failed (%s)\n", T_arg);
fprintf(stderr, "Connection failed (%s): %s\n", T_arg, err);
return (-1);
}
......
......@@ -74,6 +74,7 @@ client_thread(void *priv)
struct vsb *vsb;
char *p;
char mabuf[32], mpbuf[32];
const char *err;
CAST_OBJ_NOTNULL(c, priv, CLIENT_MAGIC);
AN(*c->connect);
......@@ -91,9 +92,10 @@ client_thread(void *priv)
vtc_log(vl, 2, "Started (%u iterations)", c->repeat);
for (u = 0; u < c->repeat; u++) {
vtc_log(vl, 3, "Connect to %s", VSB_data(vsb));
fd = VSS_open(VSB_data(vsb), 10.);
fd = VTCP_open(VSB_data(vsb), NULL, 10., &err);
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);
VTCP_blocking(fd);
VTCP_myname(fd, mabuf, sizeof mabuf, mpbuf, sizeof mpbuf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment