projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Doc: withinin -> within
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
live.c
diff --git
a/src/bin/lttng-relayd/live.c
b/src/bin/lttng-relayd/live.c
index 8a8550f40f60a9a888cf36c8f62d6509f8d3580b..6f50afc6cc6b1e2d2b48687cbf325521700b2392 100644
(file)
--- a/
src/bin/lttng-relayd/live.c
+++ b/
src/bin/lttng-relayd/live.c
@@
-452,10
+452,11
@@
struct lttcomm_sock *init_socket(struct lttng_uri *uri)
if (ret < 0) {
goto error;
}
if (ret < 0) {
goto error;
}
- DBG("Listening on sock %d for live", sock->fd);
+ DBG("Listening on sock %d for l
ttng-l
ive", sock->fd);
ret = sock->ops->bind(sock);
if (ret < 0) {
ret = sock->ops->bind(sock);
if (ret < 0) {
+ PERROR("Failed to bind lttng-live socket");
goto error;
}
goto error;
}
@@
-1038,12
+1039,12
@@
int viewer_attach_session(struct relay_connection *conn)
session = session_get_by_id(be64toh(request.session_id));
if (!session) {
DBG("Relay session %" PRIu64 " not found",
session = session_get_by_id(be64toh(request.session_id));
if (!session) {
DBG("Relay session %" PRIu64 " not found",
- be64toh(request.session_id));
+
(uint64_t)
be64toh(request.session_id));
response.status = htobe32(LTTNG_VIEWER_ATTACH_UNK);
goto send_reply;
}
DBG("Attach session ID %" PRIu64 " received",
response.status = htobe32(LTTNG_VIEWER_ATTACH_UNK);
goto send_reply;
}
DBG("Attach session ID %" PRIu64 " received",
- be64toh(request.session_id));
+
(uint64_t)
be64toh(request.session_id));
if (session->live_timer == 0) {
DBG("Not live session");
if (session->live_timer == 0) {
DBG("Not live session");
@@
-1300,7
+1301,7
@@
int viewer_get_next_index(struct relay_connection *conn)
vstream = viewer_stream_get_by_id(be64toh(request_index.stream_id));
if (!vstream) {
DBG("Client requested index of unknown stream id %" PRIu64,
vstream = viewer_stream_get_by_id(be64toh(request_index.stream_id));
if (!vstream) {
DBG("Client requested index of unknown stream id %" PRIu64,
- be64toh(request_index.stream_id));
+
(uint64_t)
be64toh(request_index.stream_id));
viewer_index.status = htobe32(LTTNG_VIEWER_INDEX_ERR);
goto send_reply;
}
viewer_index.status = htobe32(LTTNG_VIEWER_INDEX_ERR);
goto send_reply;
}
@@
-1414,7
+1415,7
@@
int viewer_get_next_index(struct relay_connection *conn)
*/
DBG("Sending viewer index for stream %" PRIu64 " offset %" PRIu64,
rstream->stream_handle,
*/
DBG("Sending viewer index for stream %" PRIu64 " offset %" PRIu64,
rstream->stream_handle,
- be64toh(packet_index.offset));
+
(uint64_t)
be64toh(packet_index.offset));
viewer_index.offset = packet_index.offset;
viewer_index.packet_size = packet_index.packet_size;
viewer_index.content_size = packet_index.content_size;
viewer_index.offset = packet_index.offset;
viewer_index.packet_size = packet_index.packet_size;
viewer_index.content_size = packet_index.content_size;
@@
-1483,6
+1484,7
@@
static
int viewer_get_packet(struct relay_connection *conn)
{
int ret;
int viewer_get_packet(struct relay_connection *conn)
{
int ret;
+ off_t lseek_ret;
char *reply = NULL;
struct lttng_viewer_get_packet get_packet_info;
struct lttng_viewer_trace_packet reply_header;
char *reply = NULL;
struct lttng_viewer_get_packet get_packet_info;
struct lttng_viewer_trace_packet reply_header;
@@
-1508,7
+1510,7
@@
int viewer_get_packet(struct relay_connection *conn)
vstream = viewer_stream_get_by_id(be64toh(get_packet_info.stream_id));
if (!vstream) {
DBG("Client requested packet of unknown stream id %" PRIu64,
vstream = viewer_stream_get_by_id(be64toh(get_packet_info.stream_id));
if (!vstream) {
DBG("Client requested packet of unknown stream id %" PRIu64,
- be64toh(get_packet_info.stream_id));
+
(uint64_t)
be64toh(get_packet_info.stream_id));
reply_header.status = htobe32(LTTNG_VIEWER_GET_PACKET_ERR);
goto send_reply_nolock;
} else {
reply_header.status = htobe32(LTTNG_VIEWER_GET_PACKET_ERR);
goto send_reply_nolock;
} else {
@@
-1524,11
+1526,11
@@
int viewer_get_packet(struct relay_connection *conn)
}
pthread_mutex_lock(&vstream->stream->lock);
}
pthread_mutex_lock(&vstream->stream->lock);
- ret = lseek(vstream->stream_fd->fd, be64toh(get_packet_info.offset),
+
lseek_
ret = lseek(vstream->stream_fd->fd, be64toh(get_packet_info.offset),
SEEK_SET);
SEEK_SET);
- if (ret < 0) {
+ if (
lseek_
ret < 0) {
PERROR("lseek fd %d to offset %" PRIu64, vstream->stream_fd->fd,
PERROR("lseek fd %d to offset %" PRIu64, vstream->stream_fd->fd,
- be64toh(get_packet_info.offset));
+
(uint64_t)
be64toh(get_packet_info.offset));
goto error;
}
read_len = lttng_read(vstream->stream_fd->fd,
goto error;
}
read_len = lttng_read(vstream->stream_fd->fd,
@@
-1537,7
+1539,7
@@
int viewer_get_packet(struct relay_connection *conn)
if (read_len < packet_data_len) {
PERROR("Relay reading trace file, fd: %d, offset: %" PRIu64,
vstream->stream_fd->fd,
if (read_len < packet_data_len) {
PERROR("Relay reading trace file, fd: %d, offset: %" PRIu64,
vstream->stream_fd->fd,
- be64toh(get_packet_info.offset));
+
(uint64_t)
be64toh(get_packet_info.offset));
goto error;
}
reply_header.status = htobe32(LTTNG_VIEWER_GET_PACKET_OK);
goto error;
}
reply_header.status = htobe32(LTTNG_VIEWER_GET_PACKET_OK);
@@
-1571,7
+1573,7
@@
send_reply_nolock:
}
DBG("Sent %u bytes for stream %" PRIu64, reply_size,
}
DBG("Sent %u bytes for stream %" PRIu64, reply_size,
- be64toh(get_packet_info.stream_id));
+
(uint64_t)
be64toh(get_packet_info.stream_id));
end_free:
free(reply);
end_free:
free(reply);
@@
-1623,7
+1625,7
@@
int viewer_get_metadata(struct relay_connection *conn)
* find it.
*/
DBG("Client requested metadata of unknown stream id %" PRIu64,
* find it.
*/
DBG("Client requested metadata of unknown stream id %" PRIu64,
- be64toh(request.stream_id));
+
(uint64_t)
be64toh(request.stream_id));
reply.status = htobe32(LTTNG_VIEWER_METADATA_ERR);
goto send_reply;
}
reply.status = htobe32(LTTNG_VIEWER_METADATA_ERR);
goto send_reply;
}
@@
-1709,7
+1711,7
@@
send_reply:
}
DBG("Sent %" PRIu64 " bytes of metadata for stream %" PRIu64, len,
}
DBG("Sent %" PRIu64 " bytes of metadata for stream %" PRIu64, len,
- be64toh(request.stream_id));
+
(uint64_t)
be64toh(request.stream_id));
DBG("Metadata sent");
DBG("Metadata sent");
@@
-1798,7
+1800,7
@@
int viewer_detach_session(struct relay_connection *conn)
session = session_get_by_id(be64toh(request.session_id));
if (!session) {
DBG("Relay session %" PRIu64 " not found",
session = session_get_by_id(be64toh(request.session_id));
if (!session) {
DBG("Relay session %" PRIu64 " not found",
- be64toh(request.session_id));
+
(uint64_t)
be64toh(request.session_id));
response.status = htobe32(LTTNG_VIEWER_DETACH_SESSION_UNK);
goto send_reply;
}
response.status = htobe32(LTTNG_VIEWER_DETACH_SESSION_UNK);
goto send_reply;
}
@@
-2073,7
+2075,7
@@
exit:
error:
lttng_poll_clean(&events);
error:
lttng_poll_clean(&events);
- /* Cleanup re
a
maining connection object. */
+ /* Cleanup remaining connection object. */
rcu_read_lock();
cds_lfht_for_each_entry(viewer_connections_ht->ht, &iter.iter,
destroy_conn,
rcu_read_lock();
cds_lfht_for_each_entry(viewer_connections_ht->ht, &iter.iter,
destroy_conn,
This page took
0.026241 seconds
and
4
git commands to generate.