projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove -s option from lttng load command
[lttng-tools.git]
/
src
/
bin
/
lttng
/
utils.c
diff --git
a/src/bin/lttng/utils.c
b/src/bin/lttng/utils.c
index b40465b38ebef7d987381ad82a5353524ef57a7a..257dfc89aeaa63d368486f47ff5ec7468656a6a8 100644
(file)
--- a/
src/bin/lttng/utils.c
+++ b/
src/bin/lttng/utils.c
@@
-341,7
+341,8
@@
int check_relayd(void)
fd = socket(AF_INET, SOCK_STREAM, 0);
if (fd < 0) {
perror("socket check relayd");
fd = socket(AF_INET, SOCK_STREAM, 0);
if (fd < 0) {
perror("socket check relayd");
- goto error;
+ ret = -1;
+ goto error_socket;
}
sin.sin_family = AF_INET;
}
sin.sin_family = AF_INET;
@@
-349,6
+350,7
@@
int check_relayd(void)
ret = inet_pton(sin.sin_family, "127.0.0.1", &sin.sin_addr);
if (ret < 1) {
perror("inet_pton check relayd");
ret = inet_pton(sin.sin_family, "127.0.0.1", &sin.sin_addr);
if (ret < 1) {
perror("inet_pton check relayd");
+ ret = -1;
goto error;
}
goto error;
}
@@
-365,8
+367,10
@@
int check_relayd(void)
ret = 1;
}
ret = 1;
}
- return ret;
-
error:
error:
- return -1;
+ if (close(fd) < 0) {
+ perror("close relayd fd");
+ }
+error_socket:
+ return ret;
}
}
This page took
0.025982 seconds
and
4
git commands to generate.