projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Enable agent application contexts if filter has such dependencies
[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 dcaaaa8dc0ec2c284eb211ebde21ab7234745b31..7fc2fb50374afd3840376726d067c15f2cacffb2 100644
(file)
--- a/
src/bin/lttng-relayd/main.c
+++ b/
src/bin/lttng-relayd/main.c
@@
-18,7
+18,6
@@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#define _GNU_SOURCE
#define _LGPL_SOURCE
#include <getopt.h>
#include <grp.h>
#define _LGPL_SOURCE
#include <getopt.h>
#include <grp.h>
@@
-40,7
+39,6
@@
#include <urcu/uatomic.h>
#include <unistd.h>
#include <fcntl.h>
#include <urcu/uatomic.h>
#include <unistd.h>
#include <fcntl.h>
-#include <config.h>
#include <lttng/lttng.h>
#include <common/common.h>
#include <lttng/lttng.h>
#include <common/common.h>
@@
-56,7
+54,7
@@
#include <common/sessiond-comm/relayd.h>
#include <common/uri.h>
#include <common/utils.h>
#include <common/sessiond-comm/relayd.h>
#include <common/uri.h>
#include <common/utils.h>
-#include <common/config/config.h>
+#include <common/config/
session-
config.h>
#include <urcu/rculist.h>
#include "cmd.h"
#include <urcu/rculist.h>
#include "cmd.h"
@@
-307,7
+305,7
@@
end:
/*
* config_entry_handler_cb used to handle options read from a config file.
/*
* config_entry_handler_cb used to handle options read from a config file.
- * See config_entry_handler_cb comment in common/config/config.h for the
+ * See config_entry_handler_cb comment in common/config/
session-
config.h for the
* return value conventions.
*/
static int config_entry_handler(const struct config_entry *entry, void *unused)
* return value conventions.
*/
static int config_entry_handler(const struct config_entry *entry, void *unused)
@@
-1068,13
+1066,13
@@
static int relay_create_session(struct lttcomm_relayd_hdr *recv_hdr,
int ret = 0, send_ret;
struct relay_session *session;
struct lttcomm_relayd_status_session reply;
int ret = 0, send_ret;
struct relay_session *session;
struct lttcomm_relayd_status_session reply;
- char session_name[NAME_MAX];
- char hostname[HOST_NAME_MAX];
+ char session_name[
LTTNG_
NAME_MAX];
+ char hostname[
LTTNG_
HOST_NAME_MAX];
uint32_t live_timer = 0;
bool snapshot = false;
uint32_t live_timer = 0;
bool snapshot = false;
- memset(session_name, 0, NAME_MAX);
- memset(hostname, 0, HOST_NAME_MAX);
+ memset(session_name, 0,
LTTNG_
NAME_MAX);
+ memset(hostname, 0,
LTTNG_
HOST_NAME_MAX);
memset(&reply, 0, sizeof(reply));
memset(&reply, 0, sizeof(reply));
@@
-2084,8
+2082,8
@@
static int handle_index_data(struct relay_stream *stream, uint64_t net_seq_num,
/* Get data offset because we are about to update the index. */
data_offset = htobe64(stream->tracefile_size_current);
/* Get data offset because we are about to update the index. */
data_offset = htobe64(stream->tracefile_size_current);
- DBG("handle_index_data: stream %" PRIu64 " data offset %" PRIu64,
-
stream->stream_handle
, stream->tracefile_size_current);
+ DBG("handle_index_data: stream %" PRIu64 "
net_seq_num %" PRIu64 "
data offset %" PRIu64,
+
stream->stream_handle, net_seq_num
, stream->tracefile_size_current);
/*
* Lookup for an existing index for that stream id/sequence
/*
* Lookup for an existing index for that stream id/sequence
@@
-2183,6
+2181,7
@@
static int relay_process_data(struct relay_connection *conn)
stream_id = be64toh(data_hdr.stream_id);
stream = stream_get_by_id(stream_id);
if (!stream) {
stream_id = be64toh(data_hdr.stream_id);
stream = stream_get_by_id(stream_id);
if (!stream) {
+ ERR("relay_process_data: Cannot find stream %" PRIu64, stream_id);
ret = -1;
goto end;
}
ret = -1;
goto end;
}
@@
-2212,6
+2211,8
@@
static int relay_process_data(struct relay_connection *conn)
if (ret == 0) {
/* Orderly shutdown. Not necessary to print an error. */
DBG("Socket %d did an orderly shutdown", conn->sock->fd);
if (ret == 0) {
/* Orderly shutdown. Not necessary to print an error. */
DBG("Socket %d did an orderly shutdown", conn->sock->fd);
+ } else {
+ ERR("Socket %d error %d", conn->sock->fd, ret);
}
ret = -1;
goto end_stream_put;
}
ret = -1;
goto end_stream_put;
@@
-2255,6
+2256,8
@@
static int relay_process_data(struct relay_connection *conn)
if (session->minor >= 4 && !session->snapshot) {
ret = handle_index_data(stream, net_seq_num, rotate_index);
if (ret < 0) {
if (session->minor >= 4 && !session->snapshot) {
ret = handle_index_data(stream, net_seq_num, rotate_index);
if (ret < 0) {
+ ERR("handle_index_data: fail stream %" PRIu64 " net_seq_num %" PRIu64 " ret %d",
+ stream->stream_handle, net_seq_num, ret);
goto end_stream_unlock;
}
}
goto end_stream_unlock;
}
}
@@
-2273,6
+2276,8
@@
static int relay_process_data(struct relay_connection *conn)
ret = write_padding_to_file(stream->stream_fd->fd,
be32toh(data_hdr.padding_size));
if (ret < 0) {
ret = write_padding_to_file(stream->stream_fd->fd,
be32toh(data_hdr.padding_size));
if (ret < 0) {
+ ERR("write_padding_to_file: fail stream %" PRIu64 " net_seq_num %" PRIu64 " ret %d",
+ stream->stream_handle, net_seq_num, ret);
goto end_stream_unlock;
}
stream->tracefile_size_current +=
goto end_stream_unlock;
}
stream->tracefile_size_current +=
This page took
0.027329 seconds
and
4
git commands to generate.