assert(ua_chan);
assert(socket);
+ memset(&msg, 0, sizeof(msg));
msg.cmd_type = LTTNG_CONSUMER_GET_CHANNEL;
msg.u.get_channel.key = ua_chan->key;
cds_list_add_tail(&stream->list, &ua_chan->streams.head);
ua_chan->streams.count++;
- DBG2("UST app stream %d received succesfully", ua_chan->streams.count);
+ DBG2("UST app stream %d received successfully", ua_chan->streams.count);
}
/* This MUST match or else we have a synchronization problem. */
assert(ua_chan);
assert(socket);
+ memset(&msg, 0, sizeof(msg));
msg.cmd_type = LTTNG_CONSUMER_DESTROY_CHANNEL;
msg.u.destroy_channel.key = ua_chan->key;
ret = ustctl_send_stream_to_ust(app->sock, channel->obj, stream->obj);
if (ret < 0) {
if (ret != -EPIPE && ret != -LTTNG_UST_ERR_EXITING) {
- ERR("Error ustctl send stream %s to app pid: %d with ret %d",
- stream->name, app->pid, ret);
+ ERR("ustctl send stream handle %d to app pid: %d with ret %d",
+ stream->obj->handle, app->pid, ret);
} else {
DBG3("UST app send stream to ust failed. Application is dead.");
}
assert(socket);
rcu_read_lock();
- pthread_mutex_lock(socket->lock);
-
health_code_update();
/* Wait for a metadata request */
+ pthread_mutex_lock(socket->lock);
ret = consumer_socket_recv(socket, &request, sizeof(request));
+ pthread_mutex_unlock(socket->lock);
if (ret < 0) {
goto end;
}
DBG("PID registry not found for session id %" PRIu64,
request.session_id_per_pid);
+ memset(&msg, 0, sizeof(msg));
msg.cmd_type = LTTNG_ERR_UND;
(void) consumer_send_msg(socket, &msg);
/*
}
assert(ust_reg);
+ pthread_mutex_lock(&ust_reg->lock);
ret_push = ust_app_push_metadata(ust_reg, socket, 1);
- if (ret_push < 0) {
+ pthread_mutex_unlock(&ust_reg->lock);
+ if (ret_push == -EPIPE) {
+ DBG("Application or relay closed while pushing metadata");
+ } else if (ret_push < 0) {
ERR("Pushing metadata");
ret = -1;
goto end;
+ } else {
+ DBG("UST Consumer metadata pushed successfully");
}
- DBG("UST Consumer metadata pushed successfully");
ret = 0;
end:
- pthread_mutex_unlock(socket->lock);
rcu_read_unlock();
return ret;
}