X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fust-consumer%2Fust-consumer.c;h=4d1737726c3b00a8a02cf068cc10dada125b9289;hb=3654ed19aa453f4be063784e215cab81441e8962;hp=46f330052aa8c04fdd440b6f4dd30485634678c5;hpb=a9577b7628a85b064c3f249c3504bad989848b49;p=lttng-tools.git diff --git a/src/common/ust-consumer/ust-consumer.c b/src/common/ust-consumer/ust-consumer.c index 46f330052..4d1737726 100644 --- a/src/common/ust-consumer/ust-consumer.c +++ b/src/common/ust-consumer/ust-consumer.c @@ -1168,7 +1168,7 @@ static int snapshot_channel(struct lttng_consumer_channel *channel, produced_pos, nb_packets_per_stream, stream->max_sb_size); - while (consumed_pos < produced_pos) { + while ((long) (consumed_pos - produced_pos) < 0) { ssize_t read_len; unsigned long len, padded_len; @@ -2109,6 +2109,19 @@ int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx, } break; } + case LTTNG_CONSUMER_INIT: + { + ret_code = lttng_consumer_init_command(ctx, + msg.u.init.sessiond_uuid); + + health_code_update(); + ret = consumer_send_status_msg(sock, ret_code); + if (ret < 0) { + /* Somehow, the session daemon is not responding anymore. */ + goto end_nosignal; + } + break; + } default: break; }