projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: Initialize global agent_apps_ht_by_sock on session daemon launch
[lttng-tools.git]
/
src
/
bin
/
lttng-consumerd
/
lttng-consumerd.c
diff --git
a/src/bin/lttng-consumerd/lttng-consumerd.c
b/src/bin/lttng-consumerd/lttng-consumerd.c
index 4a9a7a4929200bfd53c838eed13b48f52dd0ae50..5d5703064a110cac4dd8ea389430b878dd8ff302 100644
(file)
--- a/
src/bin/lttng-consumerd/lttng-consumerd.c
+++ b/
src/bin/lttng-consumerd/lttng-consumerd.c
@@
-65,6
+65,8
@@
static int sigintcount = 0;
/* Argument variables */
int lttng_opt_quiet; /* not static in error.h */
int lttng_opt_verbose; /* not static in error.h */
/* Argument variables */
int lttng_opt_quiet; /* not static in error.h */
int lttng_opt_verbose; /* not static in error.h */
+int lttng_opt_mi; /* not static in error.h */
+
static int opt_daemon;
static const char *progname;
static char command_sock_path[PATH_MAX]; /* Global command socket path */
static int opt_daemon;
static const char *progname;
static char command_sock_path[PATH_MAX]; /* Global command socket path */
@@
-341,7
+343,10
@@
int main(int argc, char **argv)
}
/* Init */
}
/* Init */
- lttng_consumer_init();
+ if (lttng_consumer_init() < 0) {
+ goto error;
+ }
+
/* Init socket timeouts */
lttcomm_init();
lttcomm_inet_init();
/* Init socket timeouts */
lttcomm_init();
lttcomm_inet_init();
@@
-405,9
+410,6
@@
int main(int argc, char **argv)
ctx->type = opt_type;
ctx->type = opt_type;
- /* Initialize communication library */
- lttcomm_init();
-
ret = utils_create_pipe(health_quit_pipe);
if (ret < 0) {
goto error_health_pipe;
ret = utils_create_pipe(health_quit_pipe);
if (ret < 0) {
goto error_health_pipe;
@@
-426,7
+428,7
@@
int main(int argc, char **argv)
* sessiond thread reply to the sessiond that we are ready.
*/
while (uatomic_read(<tng_consumer_ready)) {
* sessiond thread reply to the sessiond that we are ready.
*/
while (uatomic_read(<tng_consumer_ready)) {
-
sleep(1
);
+
usleep(100000
);
}
cmm_smp_mb(); /* Read ready before following operations */
}
cmm_smp_mb(); /* Read ready before following operations */
@@
-520,15
+522,11
@@
health_error:
error_health_pipe:
if (!ret) {
ret = EXIT_SUCCESS;
error_health_pipe:
if (!ret) {
ret = EXIT_SUCCESS;
- lttng_consumer_send_error(ctx, LTTCOMM_CONSUMERD_EXIT_SUCCESS);
goto end;
}
error:
ret = EXIT_FAILURE;
goto end;
}
error:
ret = EXIT_FAILURE;
- if (ctx) {
- lttng_consumer_send_error(ctx, LTTCOMM_CONSUMERD_EXIT_FAILURE);
- }
end:
lttng_consumer_destroy(ctx);
end:
lttng_consumer_destroy(ctx);
This page took
0.023975 seconds
and
4
git commands to generate.