break;
default:
ERR("Unknown lttng hashtable type %d", type);
+ lttng_ht_destroy(ht);
goto error;
}
/*
* Free lttng ht node uint64_t.
*/
-void lttng_ht_node_free_u64(struct lttng_ht_node_ulong *node)
+void lttng_ht_node_free_u64(struct lttng_ht_node_u64 *node)
{
assert(node);
free(node);
assert(node_ptr == &node->node);
}
+/*
+ * Add string node to hashtable.
+ */
+void lttng_ht_add_str(struct lttng_ht *ht,
+ struct lttng_ht_node_str *node)
+{
+ assert(ht);
+ assert(ht->ht);
+ assert(node);
+
+ cds_lfht_add(ht->ht, ht->hash_fct(node->key, lttng_ht_seed),
+ &node->node);
+}
+
/*
* Add unsigned long node to hashtable.
*/