Type: refactor
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I31d0f8e32f7bb508c6f57913d5a829ceaad91f7d
+ uint8_t is_alloc;
+ uint8_t is_open;
int fd;
uint32_t txbuf_size;
char *txbuf;
int fd;
uint32_t txbuf_size;
char *txbuf;
vcl_test_cfg_t cfg;
vcl_test_stats_t stats;
int session_index;
vcl_test_cfg_t cfg;
vcl_test_stats_t stats;
int session_index;
+ vppcom_endpt_t endpt;
+ uint8_t ip[16];
+ vppcom_data_segment_t ds[2];
/*
* TLS server cert and keys to be used for testing only
*/
/*
* TLS server cert and keys to be used for testing only
*/
-vcl_test_read (int fd, uint8_t * buf, uint32_t nbytes,
- vcl_test_stats_t * stats)
+vcl_test_read (vcl_test_session_t *ts, void *buf, uint32_t nbytes)
+ vcl_test_stats_t *stats = &ts->stats;
- if (stats)
- stats->rx_xacts++;
- rx_bytes = vppcom_session_read (fd, buf, nbytes);
+ stats->rx_xacts++;
+ rx_bytes = vppcom_session_read (ts->fd, buf, nbytes);
if (rx_bytes < 0)
{
errno = -rx_bytes;
rx_bytes = -1;
}
if (rx_bytes < 0)
{
errno = -rx_bytes;
rx_bytes = -1;
}
- if (stats)
- {
- if ((rx_bytes == 0) ||
- ((rx_bytes < 0)
- && ((errno == EAGAIN) || (errno == EWOULDBLOCK))))
- stats->rx_eagain++;
- else if (rx_bytes < nbytes)
- stats->rx_incomp++;
- }
+ if ((rx_bytes == 0) ||
+ ((rx_bytes < 0) && ((errno == EAGAIN) || (errno == EWOULDBLOCK))))
+ stats->rx_eagain++;
+ else if (rx_bytes < nbytes)
+ stats->rx_incomp++;
}
while ((rx_bytes == 0) ||
((rx_bytes < 0) && ((errno == EAGAIN) || (errno == EWOULDBLOCK))));
}
while ((rx_bytes == 0) ||
((rx_bytes < 0) && ((errno == EAGAIN) || (errno == EWOULDBLOCK))));
{
vterr ("vppcom_session_read()", -errno);
}
{
vterr ("vppcom_session_read()", -errno);
}
stats->rx_bytes += rx_bytes;
return (rx_bytes);
}
static inline int
stats->rx_bytes += rx_bytes;
return (rx_bytes);
}
static inline int
-vcl_test_read_ds (int fd, vppcom_data_segment_t * ds,
- vcl_test_stats_t * stats)
+vcl_test_read_ds (vcl_test_session_t *ts)
+ vcl_test_stats_t *stats = &ts->stats;
- if (stats)
- stats->rx_xacts++;
- rx_bytes = vppcom_session_read_segments (fd, ds, 2, ~0);
+ stats->rx_xacts++;
+ rx_bytes = vppcom_session_read_segments (ts->fd, ts->ds, 2, ~0);
if (rx_bytes < 0)
{
errno = -rx_bytes;
rx_bytes = -1;
}
if (rx_bytes < 0)
{
errno = -rx_bytes;
rx_bytes = -1;
}
if ((rx_bytes == 0) ||
((rx_bytes < 0)
&& ((errno == EAGAIN) || (errno == EWOULDBLOCK))))
stats->rx_eagain++;
if ((rx_bytes == 0) ||
((rx_bytes < 0)
&& ((errno == EAGAIN) || (errno == EWOULDBLOCK))))
stats->rx_eagain++;
}
while ((rx_bytes == 0) ||
((rx_bytes < 0) && ((errno == EAGAIN) || (errno == EWOULDBLOCK))));
}
while ((rx_bytes == 0) ||
((rx_bytes < 0) && ((errno == EAGAIN) || (errno == EWOULDBLOCK))));
{
vterr ("vppcom_session_read()", -errno);
}
{
vterr ("vppcom_session_read()", -errno);
}
stats->rx_bytes += rx_bytes;
return (rx_bytes);
}
static inline int
stats->rx_bytes += rx_bytes;
return (rx_bytes);
}
static inline int
-vcl_test_write (int fd, uint8_t * buf, uint32_t nbytes,
- vcl_test_stats_t * stats, uint32_t verbose)
+vcl_test_write (vcl_test_session_t *ts, void *buf, uint32_t nbytes)
{
int tx_bytes = 0, nbytes_left = nbytes, rv;
{
int tx_bytes = 0, nbytes_left = nbytes, rv;
+ vcl_test_stats_t *stats = &ts->stats;
- if (stats)
- stats->tx_xacts++;
- rv = vppcom_session_write (fd, buf, nbytes_left);
+ stats->tx_xacts++;
+ rv = vppcom_session_write (ts->fd, buf, nbytes_left);
if (rv < 0)
{
errno = -rv;
if (rv < 0)
{
errno = -rv;
- if ((errno == EAGAIN || errno == EWOULDBLOCK) && stats)
+ if ((errno == EAGAIN || errno == EWOULDBLOCK))
stats->tx_eagain++;
break;
}
stats->tx_eagain++;
break;
}
nbytes_left = nbytes_left - rv;
buf += rv;
nbytes_left = nbytes_left - rv;
buf += rv;
- if (stats)
- stats->tx_incomp++;
-
}
while (tx_bytes != nbytes);
}
while (tx_bytes != nbytes);
{
vterr ("vpcom_session_write", -errno);
}
{
vterr ("vpcom_session_write", -errno);
}
stats->tx_bytes += tx_bytes;
return (tx_bytes);
stats->tx_bytes += tx_bytes;
return (tx_bytes);
vtinf ("(fd %d): Sending config to server.", ts->fd);
vcl_test_cfg_dump (&ts->cfg, 1 /* is_client */ );
}
vtinf ("(fd %d): Sending config to server.", ts->fd);
vcl_test_cfg_dump (&ts->cfg, 1 /* is_client */ );
}
- tx_bytes = vcl_test_write (ts->fd, (uint8_t *) & ts->cfg,
- sizeof (ts->cfg), NULL, ts->cfg.verbose);
+ tx_bytes = vcl_test_write (ts, (uint8_t *) &ts->cfg, sizeof (ts->cfg));
if (tx_bytes < 0)
{
vtwrn ("(fd %d): write test cfg failed (%d)!", ts->fd, tx_bytes);
return tx_bytes;
}
if (tx_bytes < 0)
{
vtwrn ("(fd %d): write test cfg failed (%d)!", ts->fd, tx_bytes);
return tx_bytes;
}
- rx_bytes = vcl_test_read (ts->fd, (uint8_t *) ts->rxbuf,
- sizeof (vcl_test_cfg_t), NULL);
+ rx_bytes =
+ vcl_test_read (ts, (uint8_t *) ts->rxbuf, sizeof (vcl_test_cfg_t));
if (rx_bytes < 0)
return rx_bytes;
if (rx_bytes < 0)
return rx_bytes;
vcl_test_client_main_t *vcm = &vcl_client_main;
vcl_test_session_t *ctrl = &vcm->ctrl_session;
vcl_test_client_worker_t *wrk = arg;
vcl_test_client_main_t *vcm = &vcl_client_main;
vcl_test_session_t *ctrl = &vcm->ctrl_session;
vcl_test_client_worker_t *wrk = arg;
- uint32_t n_active_sessions, n_bytes;
+ uint32_t n_active_sessions;
fd_set _wfdset, *wfdset = &_wfdset;
fd_set _rfdset, *rfdset = &_rfdset;
vcl_test_session_t *ts;
fd_set _wfdset, *wfdset = &_wfdset;
fd_set _rfdset, *rfdset = &_rfdset;
vcl_test_session_t *ts;
if (FD_ISSET (vppcom_session_index (ts->fd), rfdset)
&& ts->stats.rx_bytes < ts->cfg.total_bytes)
{
if (FD_ISSET (vppcom_session_index (ts->fd), rfdset)
&& ts->stats.rx_bytes < ts->cfg.total_bytes)
{
- (void) vcl_test_read (ts->fd, (uint8_t *) ts->rxbuf,
- ts->rxbuf_size, &ts->stats);
+ (void) vcl_test_read (ts, (uint8_t *) ts->rxbuf, ts->rxbuf_size);
}
if (FD_ISSET (vppcom_session_index (ts->fd), wfdset)
&& ts->stats.tx_bytes < ts->cfg.total_bytes)
{
}
if (FD_ISSET (vppcom_session_index (ts->fd), wfdset)
&& ts->stats.tx_bytes < ts->cfg.total_bytes)
{
- n_bytes = ts->cfg.txbuf_size;
- if (ts->cfg.test == VCL_TEST_TYPE_ECHO)
- n_bytes = strlen (ctrl->txbuf) + 1;
- rv = vcl_test_write (ts->fd, (uint8_t *) ts->txbuf,
- n_bytes, &ts->stats, ts->cfg.verbose);
+ rv =
+ vcl_test_write (ts, (uint8_t *) ts->txbuf, ts->cfg.txbuf_size);
if (rv < 0)
{
vtwrn ("vppcom_test_write (%d) failed -- aborting test",
if (rv < 0)
{
vtwrn ("vppcom_test_write (%d) failed -- aborting test",
cfg->total_bytes = strlen (ctrl->txbuf) + 1;
memset (&ctrl->stats, 0, sizeof (ctrl->stats));
cfg->total_bytes = strlen (ctrl->txbuf) + 1;
memset (&ctrl->stats, 0, sizeof (ctrl->stats));
- rv = vcl_test_write (ctrl->fd, (uint8_t *) ctrl->txbuf, cfg->total_bytes,
- &ctrl->stats, ctrl->cfg.verbose);
+ rv = vcl_test_write (ctrl, (uint8_t *) ctrl->txbuf, cfg->total_bytes);
if (rv < 0)
{
vtwrn ("vppcom_test_write (%d) failed ", ctrl->fd);
return;
}
if (rv < 0)
{
vtwrn ("vppcom_test_write (%d) failed ", ctrl->fd);
return;
}
- (void) vcl_test_read (ctrl->fd, (uint8_t *) ctrl->rxbuf, ctrl->rxbuf_size,
- &ctrl->stats);
+ (void) vcl_test_read (ctrl, (uint8_t *) ctrl->rxbuf, ctrl->rxbuf_size);
vtinf ("(fd %d): Sending exit cfg to server...", ctrl->fd);
if (verbose)
vcl_test_cfg_dump (&ctrl->cfg, 1 /* is_client */);
vtinf ("(fd %d): Sending exit cfg to server...", ctrl->fd);
if (verbose)
vcl_test_cfg_dump (&ctrl->cfg, 1 /* is_client */);
- (void) vcl_test_write (ctrl->fd, (uint8_t *) & ctrl->cfg,
- sizeof (ctrl->cfg), &ctrl->stats, verbose);
+ (void) vcl_test_write (ctrl, (uint8_t *) &ctrl->cfg, sizeof (ctrl->cfg));
#include <vppinfra/mem.h>
#include <pthread.h>
#include <vppinfra/mem.h>
#include <pthread.h>
-typedef struct
-{
- uint8_t is_alloc;
- uint8_t is_open;
- int fd;
- uint8_t *buf;
- uint32_t buf_size;
- vcl_test_cfg_t cfg;
- vcl_test_stats_t stats;
- vppcom_endpt_t endpt;
- uint8_t ip[16];
- vppcom_data_segment_t ds[2];
-} vcl_test_server_conn_t;
-
typedef struct
{
uint16_t port;
typedef struct
{
uint16_t port;
int epfd;
struct epoll_event wait_events[VCL_TEST_CFG_MAX_EPOLL_EVENTS];
size_t conn_pool_size;
int epfd;
struct epoll_event wait_events[VCL_TEST_CFG_MAX_EPOLL_EVENTS];
size_t conn_pool_size;
- vcl_test_server_conn_t *conn_pool;
+ vcl_test_session_t *conn_pool;
int nfds;
pthread_t thread_handle;
} vcl_test_server_worker_t;
int nfds;
pthread_t thread_handle;
} vcl_test_server_worker_t;
vcl_test_server_cfg_t cfg;
vcl_test_server_worker_t *workers;
vcl_test_server_cfg_t cfg;
vcl_test_server_worker_t *workers;
- vcl_test_server_conn_t *ctrl;
+ vcl_test_session_t *ctrl;
int ctrl_listen_fd;
struct sockaddr_storage servaddr;
volatile int worker_fails;
int ctrl_listen_fd;
struct sockaddr_storage servaddr;
volatile int worker_fails;
static inline void
conn_pool_expand (vcl_test_server_worker_t * wrk, size_t expand_size)
{
static inline void
conn_pool_expand (vcl_test_server_worker_t * wrk, size_t expand_size)
{
- vcl_test_server_conn_t *conn_pool;
+ vcl_test_session_t *conn_pool;
size_t new_size = wrk->conn_pool_size + expand_size;
int i;
size_t new_size = wrk->conn_pool_size + expand_size;
int i;
{
for (i = wrk->conn_pool_size; i < new_size; i++)
{
{
for (i = wrk->conn_pool_size; i < new_size; i++)
{
- vcl_test_server_conn_t *conn = &conn_pool[i];
+ vcl_test_session_t *conn = &conn_pool[i];
memset (conn, 0, sizeof (*conn));
vcl_test_cfg_init (&conn->cfg);
memset (conn, 0, sizeof (*conn));
vcl_test_cfg_init (&conn->cfg);
- vcl_test_buf_alloc (&conn->cfg, 1 /* is_rxbuf */ ,
- &conn->buf, &conn->buf_size);
+ vcl_test_buf_alloc (&conn->cfg, 1 /* is_rxbuf */,
+ (uint8_t **) &conn->rxbuf, &conn->rxbuf_size);
conn->cfg.txbuf_size = conn->cfg.rxbuf_size;
}
conn->cfg.txbuf_size = conn->cfg.rxbuf_size;
}
-static inline vcl_test_server_conn_t *
-conn_pool_alloc (vcl_test_server_worker_t * wrk)
+static inline vcl_test_session_t *
+conn_pool_alloc (vcl_test_server_worker_t *wrk)
-conn_pool_free (vcl_test_server_conn_t * conn)
+conn_pool_free (vcl_test_session_t *conn)
{
conn->fd = 0;
conn->is_alloc = 0;
}
static inline void
{
conn->fd = 0;
conn->is_alloc = 0;
}
static inline void
-sync_config_and_reply (vcl_test_server_conn_t * conn, vcl_test_cfg_t * rx_cfg)
+sync_config_and_reply (vcl_test_session_t *conn, vcl_test_cfg_t *rx_cfg)
- vcl_test_buf_alloc (&conn->cfg, 1 /* is_rxbuf */ ,
- &conn->buf, &conn->buf_size);
+ vcl_test_buf_alloc (&conn->cfg, 1 /* is_rxbuf */, (uint8_t **) &conn->rxbuf,
+ &conn->rxbuf_size);
conn->cfg.txbuf_size = conn->cfg.rxbuf_size;
if (conn->cfg.verbose)
conn->cfg.txbuf_size = conn->cfg.rxbuf_size;
if (conn->cfg.verbose)
vtinf ("(fd %d): Replying to cfg message!\n", conn->fd);
vcl_test_cfg_dump (&conn->cfg, 0 /* is_client */ );
}
vtinf ("(fd %d): Replying to cfg message!\n", conn->fd);
vcl_test_cfg_dump (&conn->cfg, 0 /* is_client */ );
}
- (void) vcl_test_write (conn->fd, (uint8_t *) & conn->cfg,
- sizeof (conn->cfg), NULL, conn->cfg.verbose);
+ (void) vcl_test_write (conn, &conn->cfg, sizeof (conn->cfg));
-vts_session_close (vcl_test_server_conn_t *conn)
+vts_session_close (vcl_test_session_t *conn)
{
if (!conn->is_open)
return;
{
if (!conn->is_open)
return;
-vts_session_cleanup (vcl_test_server_conn_t *conn)
+vts_session_cleanup (vcl_test_session_t *conn)
{
vts_session_close (conn);
conn_pool_free (conn);
{
vts_session_close (conn);
conn_pool_free (conn);
static void
vts_wrk_cleanup_all (vcl_test_server_worker_t *wrk)
{
static void
vts_wrk_cleanup_all (vcl_test_server_worker_t *wrk)
{
- vcl_test_server_conn_t *conn;
+ vcl_test_session_t *conn;
int i;
for (i = 0; i < wrk->conn_pool_size; i++)
int i;
for (i = 0; i < wrk->conn_pool_size; i++)
-vts_test_cmd (vcl_test_server_worker_t *wrk, vcl_test_server_conn_t *conn,
+vts_test_cmd (vcl_test_server_worker_t *wrk, vcl_test_session_t *conn,
vcl_test_cfg_t *rx_cfg)
{
u8 is_bi = rx_cfg->test == VCL_TEST_TYPE_BI;
vcl_test_cfg_t *rx_cfg)
{
u8 is_bi = rx_cfg->test == VCL_TEST_TYPE_BI;
- vcl_test_server_conn_t *tc;
+ vcl_test_session_t *tc;
vcl_test_cfg_dump (&conn->cfg, 0 /* is_client */ );
if (conn->cfg.verbose)
{
vcl_test_cfg_dump (&conn->cfg, 0 /* is_client */ );
if (conn->cfg.verbose)
{
- vtinf (" vcl server main\n"
- VCL_TEST_SEPARATOR_STRING
+ vtinf (" vcl server main\n" VCL_TEST_SEPARATOR_STRING
- " buf size: %u (0x%08x)\n"
- VCL_TEST_SEPARATOR_STRING,
- conn->buf, conn->buf_size, conn->buf_size);
+ " buf size: %u (0x%08x)\n" VCL_TEST_SEPARATOR_STRING,
+ conn->rxbuf, conn->rxbuf_size, conn->rxbuf_size);
}
sync_config_and_reply (conn, rx_cfg);
}
sync_config_and_reply (conn, rx_cfg);
-vts_server_process_rx (vcl_test_server_conn_t *conn, int rx_bytes)
+vts_server_process_rx (vcl_test_session_t *conn, int rx_bytes)
{
vcl_test_server_main_t *vsm = &vcl_server_main;
{
vcl_test_server_main_t *vsm = &vcl_server_main;
- int client_fd = conn->fd;
if (conn->cfg.test == VCL_TEST_TYPE_BI)
{
if (vsm->use_ds)
{
if (conn->cfg.test == VCL_TEST_TYPE_BI)
{
if (vsm->use_ds)
{
- (void) vcl_test_write (client_fd, conn->ds[0].data, conn->ds[0].len,
- &conn->stats, conn->cfg.verbose);
+ (void) vcl_test_write (conn, conn->ds[0].data, conn->ds[0].len);
- (void) vcl_test_write (client_fd, conn->ds[1].data,
- conn->ds[1].len, &conn->stats,
- conn->cfg.verbose);
+ (void) vcl_test_write (conn, conn->ds[1].data, conn->ds[1].len);
- (void) vcl_test_write (client_fd, conn->buf, rx_bytes, &conn->stats,
- conn->cfg.verbose);
+ (void) vcl_test_write (conn, conn->rxbuf, rx_bytes);
-vts_copy_ds (void *buf, vppcom_data_segment_t * ds, u32 max_bytes)
-{
- uint32_t n_bytes = 0, ds_idx = 0, to_copy;
-
- while (n_bytes < max_bytes)
- {
- to_copy = clib_min (ds[ds_idx].len, max_bytes - n_bytes);
- clib_memcpy_fast (buf + n_bytes, ds[ds_idx].data, to_copy);
- n_bytes += to_copy;
- ds_idx += 1;
- }
-}
-
-static void
-vts_server_echo (vcl_test_server_conn_t * conn, int rx_bytes)
+vts_server_echo (vcl_test_session_t *conn, int rx_bytes)
- vcl_test_server_main_t *vsm = &vcl_server_main;
int tx_bytes, nbytes, pos;
int tx_bytes, nbytes, pos;
- if (vsm->use_ds)
- vts_copy_ds (conn->buf, conn->ds, rx_bytes);
-
/* If it looks vaguely like a string, make sure it's terminated */
/* If it looks vaguely like a string, make sure it's terminated */
- pos = rx_bytes < conn->buf_size ? rx_bytes : conn->buf_size - 1;
- ((char *) conn->buf)[pos] = 0;
- vtinf ("(fd %d): RX (%d bytes) - '%s'", conn->fd, rx_bytes, conn->buf);
+ pos = rx_bytes < conn->rxbuf_size ? rx_bytes : conn->rxbuf_size - 1;
+ ((char *) conn->rxbuf)[pos] = 0;
+ vtinf ("(fd %d): RX (%d bytes) - '%s'", conn->fd, rx_bytes, conn->rxbuf);
if (conn->cfg.verbose)
vtinf ("(fd %d): Echoing back", conn->fd);
if (conn->cfg.verbose)
vtinf ("(fd %d): Echoing back", conn->fd);
- nbytes = strlen ((const char *) conn->buf) + 1;
- tx_bytes = vcl_test_write (conn->fd, conn->buf, nbytes, &conn->stats,
- conn->cfg.verbose);
+ nbytes = strlen ((const char *) conn->rxbuf) + 1;
+ tx_bytes = vcl_test_write (conn, conn->rxbuf, nbytes);
- vtinf ("(fd %d): TX (%d bytes) - '%s'", conn->fd, tx_bytes, conn->buf);
+ vtinf ("(fd %d): TX (%d bytes) - '%s'", conn->fd, tx_bytes, conn->rxbuf);
-static vcl_test_server_conn_t *
+static vcl_test_session_t *
vts_accept_client (vcl_test_server_worker_t *wrk, int listen_fd)
{
vts_accept_client (vcl_test_server_worker_t *wrk, int listen_fd)
{
- vcl_test_server_conn_t *conn;
+ vcl_test_session_t *conn;
struct epoll_event ev;
int rv, client_fd;
struct epoll_event ev;
int rv, client_fd;
int
vts_handle_ctrl_cfg (vcl_test_server_worker_t *wrk, vcl_test_cfg_t *rx_cfg,
int
vts_handle_ctrl_cfg (vcl_test_server_worker_t *wrk, vcl_test_cfg_t *rx_cfg,
- vcl_test_server_conn_t *conn, int rx_bytes)
+ vcl_test_session_t *conn, int rx_bytes)
{
int listener_fd;
if (rx_cfg->verbose)
{
int listener_fd;
if (rx_cfg->verbose)
vtinf ("(fd %d): Replying to cfg msg", conn->fd);
vcl_test_cfg_dump (rx_cfg, 0 /* is_client */ );
}
vtinf ("(fd %d): Replying to cfg msg", conn->fd);
vcl_test_cfg_dump (rx_cfg, 0 /* is_client */ );
}
- vcl_test_write (conn->fd, (uint8_t *) & conn->cfg,
- sizeof (conn->cfg), NULL, conn->cfg.verbose);
+ vcl_test_write (conn, &conn->cfg, sizeof (conn->cfg));
-vts_conn_read (vcl_test_server_conn_t * conn)
+vts_conn_read (vcl_test_session_t *conn)
{
vcl_test_server_main_t *vsm = &vcl_server_main;
if (vsm->use_ds)
{
vcl_test_server_main_t *vsm = &vcl_server_main;
if (vsm->use_ds)
- return vcl_test_read_ds (conn->fd, conn->ds, &conn->stats);
+ return vcl_test_read_ds (conn);
- return vcl_test_read (conn->fd, conn->buf, conn->buf_size, &conn->stats);
+ return vcl_test_read (conn, conn->rxbuf, conn->rxbuf_size);
{
vcl_test_server_main_t *vsm = &vcl_server_main;
vcl_test_server_worker_t *wrk = arg;
{
vcl_test_server_main_t *vsm = &vcl_server_main;
vcl_test_server_worker_t *wrk = arg;
- vcl_test_server_conn_t *conn;
+ vcl_test_session_t *conn;
int i, rx_bytes, num_ev, listener_fd;
vcl_test_cfg_t *rx_cfg;
int i, rx_bytes, num_ev, listener_fd;
vcl_test_cfg_t *rx_cfg;
if (!wrk->wrk_index && conn->fd == vsm->ctrl->fd)
{
if (!wrk->wrk_index && conn->fd == vsm->ctrl->fd)
{
- rx_bytes = vcl_test_read (conn->fd, conn->buf, conn->buf_size,
- &conn->stats);
- rx_cfg = (vcl_test_cfg_t *) conn->buf;
+ rx_bytes = vcl_test_read (conn, conn->rxbuf, conn->rxbuf_size);
+ rx_cfg = (vcl_test_cfg_t *) conn->rxbuf;
if (rx_cfg->magic == VCL_TEST_CFG_CTRL_MAGIC)
{
vts_handle_ctrl_cfg (wrk, rx_cfg, conn, rx_bytes);
if (rx_cfg->magic == VCL_TEST_CFG_CTRL_MAGIC)
{
vts_handle_ctrl_cfg (wrk, rx_cfg, conn, rx_bytes);
- else if (isascii (conn->buf[0]))
+ else if (isascii (conn->rxbuf[0]))
{
vts_server_echo (conn, rx_bytes);
}
{
vts_server_echo (conn, rx_bytes);
}