#include "ust-events-internal.h"
#include "wait.h"
#include "../libringbuffer/shm.h"
+#include "../libringbuffer/frontend_types.h"
#include "../libcounter/counter.h"
#include "jhash.h"
#include <lttng/ust-abi.h>
cds_list_del(<tng_chan->priv->node);
lttng_destroy_context(lttng_chan->priv->ctx);
chan = lttng_chan->chan;
- handle = lttng_chan->handle;
+ handle = chan->handle;
channel_destroy(chan, handle, 0);
free(lttng_chan->parent);
free(lttng_chan->priv);
abort();
}
}
+
+int lttng_ust_session_uuid_validate(struct lttng_ust_session *session,
+ unsigned char *uuid)
+{
+ if (!session)
+ return 0;
+ /* Compare UUID with session. */
+ if (session->priv->uuid_set) {
+ if (memcmp(session->priv->uuid, uuid, LTTNG_UST_UUID_LEN)) {
+ return -1;
+ }
+ } else {
+ memcpy(session->priv->uuid, uuid, LTTNG_UST_UUID_LEN);
+ session->priv->uuid_set = true;
+ }
+ return 0;
+
+}