projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: send the streams sent message after metadata
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
main.c
diff --git
a/src/bin/lttng-relayd/main.c
b/src/bin/lttng-relayd/main.c
index 789e3300abc1e33a604a5d5aa78ffc816ae3ce4d..d8105e4058128bdc9a902bb8051fc991971f2b90 100644
(file)
--- a/
src/bin/lttng-relayd/main.c
+++ b/
src/bin/lttng-relayd/main.c
@@
-61,6
+61,7
@@
#include "lttng-relayd.h"
#include "live.h"
#include "health-relayd.h"
#include "lttng-relayd.h"
#include "live.h"
#include "health-relayd.h"
+#include "testpoint.h"
/* command line options */
char *opt_output_path;
/* command line options */
char *opt_output_path;
@@
-753,6
+754,10
@@
void *relay_thread_listener(void *data)
lttng_relay_notify_ready();
lttng_relay_notify_ready();
+ if (testpoint(relayd_thread_listener)) {
+ goto error_testpoint;
+ }
+
while (1) {
health_code_update();
while (1) {
health_code_update();
@@
-853,6
+858,7
@@
restart:
exit:
error:
error_poll_add:
exit:
error:
error_poll_add:
+error_testpoint:
lttng_poll_clean(&events);
error_create_poll:
if (data_sock->fd >= 0) {
lttng_poll_clean(&events);
error_create_poll:
if (data_sock->fd >= 0) {
@@
-896,6
+902,10
@@
void *relay_thread_dispatcher(void *data)
health_register(health_relayd, HEALTH_RELAYD_TYPE_DISPATCHER);
health_register(health_relayd, HEALTH_RELAYD_TYPE_DISPATCHER);
+ if (testpoint(relayd_thread_dispatcher)) {
+ goto error_testpoint;
+ }
+
health_code_update();
while (!CMM_LOAD_SHARED(dispatch_thread_exit)) {
health_code_update();
while (!CMM_LOAD_SHARED(dispatch_thread_exit)) {
@@
-942,6
+952,7
@@
void *relay_thread_dispatcher(void *data)
err = 0;
error:
err = 0;
error:
+error_testpoint:
if (err) {
health_error();
ERR("Health error occurred in %s", __func__);
if (err) {
health_error();
ERR("Health error occurred in %s", __func__);
@@
-1154,6
+1165,10
@@
int relay_create_session(struct lttcomm_relayd_hdr *recv_hdr,
reply.session_id = htobe64(session->id);
switch (cmd->minor) {
reply.session_id = htobe64(session->id);
switch (cmd->minor) {
+ case 1:
+ case 2:
+ case 3:
+ break;
case 4: /* LTTng sessiond 2.4 */
default:
ret = cmd_create_session_2_4(cmd, session);
case 4: /* LTTng sessiond 2.4 */
default:
ret = cmd_create_session_2_4(cmd, session);
@@
-1335,11
+1350,7
@@
int relay_add_stream(struct lttcomm_relayd_hdr *recv_hdr,
* stream message is received, this list is emptied and streams are set
* with the viewer ready flag.
*/
* stream message is received, this list is emptied and streams are set
* with the viewer ready flag.
*/
- if (stream->metadata_flag) {
- stream->viewer_ready = 1;
- } else {
- queue_stream_handle(stream->stream_handle, cmd);
- }
+ queue_stream_handle(stream->stream_handle, cmd);
lttng_ht_node_init_ulong(&stream->stream_n,
(unsigned long) stream->stream_handle);
lttng_ht_node_init_ulong(&stream->stream_n,
(unsigned long) stream->stream_handle);
@@
-2560,6
+2571,10
@@
void *relay_thread_worker(void *data)
health_register(health_relayd, HEALTH_RELAYD_TYPE_WORKER);
health_register(health_relayd, HEALTH_RELAYD_TYPE_WORKER);
+ if (testpoint(relayd_thread_worker)) {
+ goto error_testpoint;
+ }
+
health_code_update();
/* table of connections indexed on socket */
health_code_update();
/* table of connections indexed on socket */
@@
-2821,6
+2836,7
@@
relay_connections_ht_error:
}
DBG("Worker thread cleanup complete");
free(data_buffer);
}
DBG("Worker thread cleanup complete");
free(data_buffer);
+error_testpoint:
if (err) {
health_error();
ERR("Health error occurred in %s", __func__);
if (err) {
health_error();
ERR("Health error occurred in %s", __func__);
This page took
0.026456 seconds
and
4
git commands to generate.