* SOFTWARE.
*/
+#define BT_LOG_TAG "PLUGIN-CTF-LTTNG-LIVE-SRC-VIEWER"
+#include "logging.h"
+
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <babeltrace/common-internal.h>
#include <babeltrace/graph/graph.h>
-#define BT_LOG_TAG "PLUGIN-CTF-LTTNG-LIVE-VIEWER"
-
#include "lttng-live-internal.h"
#include "viewer-connection.h"
#include "lttng-viewer-abi.h"
lsession.session_name[LTTNG_VIEWER_NAME_MAX - 1] = '\0';
session_id = be64toh(lsession.id);
+ BT_LOGD("Adding session %" PRIu64 " hostname: %s session_name: %s",
+ session_id, lsession.hostname, lsession.session_name);
+
if ((strncmp(lsession.session_name,
viewer_connection->session_name->str,
MAXNAMLEN) == 0) && (strncmp(lsession.hostname,
viewer_connection->target_hostname->str,
MAXNAMLEN) == 0)) {
- if (lttng_live_add_session(lttng_live, session_id)) {
+ if (lttng_live_add_session(lttng_live, session_id,
+ lsession.hostname,
+ lsession.session_name)) {
goto error;
}
}
stream_id, stream.path_name,
stream.channel_name);
if (lttng_live_metadata_create_stream(session,
- ctf_trace_id, stream_id)) {
+ ctf_trace_id, stream_id,
+ stream.path_name)) {
BT_LOGE("Error creating metadata stream");
goto error;
error:
if (bt_graph_is_canceled(lttng_live->graph)) {
- status = BT_CTF_NOTIF_ITER_MEDIUM_STATUS_AGAIN;
+ status = BT_CTF_LTTNG_LIVE_ITERATOR_STATUS_AGAIN;
} else {
- status = BT_CTF_NOTIF_ITER_MEDIUM_STATUS_ERROR;
+ status = BT_CTF_LTTNG_LIVE_ITERATOR_STATUS_ERROR;
}
return status;
}