X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvcl%2Fsock_test_client.c;h=fb71cd7c719150e89a599a9f323a27826f0be49a;hb=refs%2Fchanges%2F13%2F16713%2F3;hp=bf467981815f1b2ec4b57ca76ca2a37684b77a37;hpb=dc2e251398b196a6fa3b2287f0755330757df02a;p=vpp.git diff --git a/src/vcl/sock_test_client.c b/src/vcl/sock_test_client.c index bf467981815..fb71cd7c719 100644 --- a/src/vcl/sock_test_client.c +++ b/src/vcl/sock_test_client.c @@ -157,8 +157,9 @@ echo_test_client () _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; @@ -417,8 +418,9 @@ stream_test_client (vcl_test_t test) _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; @@ -648,7 +650,14 @@ sock_test_connect_test_sockets (uint32_t num_test_sockets) 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);