aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl/vcom.c
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2017-11-24 21:44:06 -0500
committerDave Wallace <dwallacelf@gmail.com>2017-11-25 03:36:10 -0500
commitee45d41a10c3459fc11e7d037fc411fd4cdfd495 (patch)
tree60c245db1cb84c8c6780e00499b0808b339ff7ca /src/vcl/vcom.c
parent60d48bbd13649133e51cf56e072c11305c661797 (diff)
VCL: improve debug output
- Refactor debug output to include vpp handle associated with session id where appropriate. - Fix vcom_connect return value on error. - Refactor vcom_socket_epoll_pwait(). - Fix sock_test_server/client connect failure handling. Change-Id: I2649596aa4b8a77d9bd876409a76810cb2785797 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'src/vcl/vcom.c')
-rw-r--r--src/vcl/vcom.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/vcl/vcom.c b/src/vcl/vcom.c
index 26948d51840..24b8f2985eb 100644
--- a/src/vcl/vcom.c
+++ b/src/vcl/vcom.c
@@ -1951,6 +1951,12 @@ vcom_connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len)
case AF_INET:
case AF_INET6:
rv = vcom_socket_connect (__fd, __addr, __len);
+ if (!rv)
+ {
+ errno = -rv;
+ return -1;
+
+ }
break;
default:
@@ -1977,7 +1983,7 @@ connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len)
"'%04d'='%04d', '%p', '%04d'\n",
pid, (unsigned long) tid, (unsigned long) tid,
rv, __fd, __addr, __len);
- if (rv != 0)
+ if (!rv)
{
errno = -rv;
return -1;