git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/txgbe: add PHY init
[dpdk.git]
/
app
/
test
/
test_telemetry_data.c
diff --git
a/app/test/test_telemetry_data.c
b/app/test/test_telemetry_data.c
index
7a31e68
..
f34d691
100644
(file)
--- a/
app/test/test_telemetry_data.c
+++ b/
app/test/test_telemetry_data.c
@@
-319,14
+319,18
@@
connect_to_socket(void)
"%s/dpdk_telemetry.%s", rte_eal_get_runtime_dir(),
TELEMETRY_VERSION);
if (connect(sock, (struct sockaddr *) &telem_addr,
"%s/dpdk_telemetry.%s", rte_eal_get_runtime_dir(),
TELEMETRY_VERSION);
if (connect(sock, (struct sockaddr *) &telem_addr,
- sizeof(telem_addr)) < 0)
+ sizeof(telem_addr)) < 0)
{
printf("\n%s: Error connecting to socket: %s\n", __func__,
strerror(errno));
printf("\n%s: Error connecting to socket: %s\n", __func__,
strerror(errno));
+ close(sock);
+ return -1;
+ }
bytes = read(sock, buf, sizeof(buf) - 1);
if (bytes < 0) {
printf("%s: Error with socket read - %s\n", __func__,
strerror(errno));
bytes = read(sock, buf, sizeof(buf) - 1);
if (bytes < 0) {
printf("%s: Error with socket read - %s\n", __func__,
strerror(errno));
+ close(sock);
return -1;
}
buf[bytes] = '\0';
return -1;
}
buf[bytes] = '\0';