#include <unistd.h>
#include <lttng/lttng.h>
+#include <lttng-ht.h>
#include <lttng-sessiond-comm.h>
#include <lttngerr.h>
#include "channel.h"
-#include "../common/hashtable.h"
#include "kernel.h"
#include "ust-ctl.h"
#include "utils.h"
struct lttng_channel *attr)
{
int ret = LTTCOMM_OK;
- struct cds_lfht *chan_ht;
+ struct lttng_ht *chan_ht;
struct ltt_ust_channel *uchan = NULL;
struct lttng_channel *defattr = NULL;
}
uchan->enabled = 1;
- hashtable_add_unique(chan_ht, &uchan->node);
+ lttng_ht_add_unique_str(chan_ht, &uchan->node);
DBG2("Channel %s created successfully", uchan->name);
free(defattr);
return LTTCOMM_OK;
error_free_chan:
+ /*
+ * No need to remove the channel from the hash table because at this point
+ * it was not added hence the direct call and no call_rcu().
+ */
trace_ust_destroy_channel(uchan);
error:
free(defattr);