/*
- * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Copyright (c) 2017-2019 Cisco and/or its affiliates.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
_rfdset = rd_fdset;
#ifdef VCL_TEST
- rv = vppcom_select (nfds, (uint64_t *) rfdset, (uint64_t *) wfdset,
- NULL, 0);
+ rv =
+ vppcom_select (nfds, (unsigned long *) rfdset,
+ (unsigned long *) wfdset, NULL, 0);
#else
{
struct timeval timeout;
_rfdset = rd_fdset;
#ifdef VCL_TEST
- rv = vppcom_select (nfds, (uint64_t *) rfdset, (uint64_t *) wfdset,
- NULL, 0);
+ rv =
+ vppcom_select (nfds, (unsigned long *) rfdset,
+ (unsigned long *) wfdset, NULL, 0);
#else
{
struct timeval timeout;
errno_val);
return tsock->fd;
}
- fcntl (tsock->fd, F_SETFL, O_NONBLOCK);
+ if (fcntl (tsock->fd, F_SETFL, O_NONBLOCK) < 0)
+ {
+ errno_val = errno;
+ perror ("ERROR in sock_test_connect_test_sockets()");
+ fprintf (stderr, "CLIENT: ERROR: fcntl failed (errno = %d)!\n",
+ errno_val);
+ return -1;
+ }
#ifdef VCL_TEST
rv = vppcom_session_connect (tsock->fd, &scm->server_endpt);