]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Last rbtree rename...
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 15 Apr 2021 15:11:24 +0000 (10:11 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 15 Apr 2021 15:11:24 +0000 (10:11 -0500)
31 files changed:
src/bin/radclient.c
src/bin/radsniff.c
src/lib/io/master.c
src/lib/io/network.c
src/lib/io/worker.c
src/lib/server/cf_file.c
src/lib/server/client.c
src/lib/server/dl_module.c
src/lib/server/map_proc.c
src/lib/server/method.c
src/lib/server/state.c
src/lib/server/trigger.c
src/lib/server/virtual_servers.c
src/lib/unlang/xlat_builtin.c
src/lib/unlang/xlat_inst.c
src/lib/util/dict_util.c
src/lib/util/dl.c
src/lib/util/event.c
src/lib/util/hash.c
src/lib/util/hash.h
src/lib/util/rb.h
src/modules/proto_bfd/proto_bfd.c
src/modules/proto_ldap_sync/sync.c
src/modules/rlm_cache/drivers/rlm_cache_rbtree/rlm_cache_rbtree.c
src/modules/rlm_csv/rlm_csv.c
src/modules/rlm_detail/rlm_detail.c
src/modules/rlm_isc_dhcp/rlm_isc_dhcp.c
src/modules/rlm_radius/track.c
src/modules/rlm_securid/rlm_securid.c
src/modules/rlm_sigtran/sccp.c
src/modules/rlm_stats/rlm_stats.c

index 39acda865a35810df88ccf840d2410fcf17922c7..f4deca265ab32ff940a8314feea040e972c5475a 100644 (file)
@@ -1152,7 +1152,7 @@ int main(int argc, char **argv)
 
        talloc_set_log_stderr();
 
-       filename_tree = fr_rb_tree_talloc_alloc(NULL, rc_file_pair_t, node, filename_cmp, NULL, 0);
+       filename_tree = fr_rb_talloc_alloc(NULL, rc_file_pair_t, node, filename_cmp, NULL, 0);
        if (!filename_tree) {
        oom:
                ERROR("Out of memory");
index e291a7893e5240d061dda68e1ef4293fc062b0e3..3f75d6b38651914e955b7c4599879d97b2ebd44c 100644 (file)
@@ -2658,7 +2658,7 @@ int main(int argc, char *argv[])
                        usage(64);
                }
 
-               link_tree = fr_rb_tree_talloc_alloc(conf, rs_request_t, link_node, rs_rtx_cmp, _unmark_link, 0);
+               link_tree = fr_rb_talloc_alloc(conf, rs_request_t, link_node, rs_rtx_cmp, _unmark_link, 0);
                if (!link_tree) {
                        ERROR("Failed creating RTX tree");
                        goto finish;
@@ -2716,7 +2716,7 @@ int main(int argc, char *argv[])
        /*
         *      Setup the request tree
         */
-       request_tree = fr_rb_tree_talloc_alloc(conf, rs_request_t, request_node, rs_packet_cmp, _unmark_request, 0);
+       request_tree = fr_rb_talloc_alloc(conf, rs_request_t, request_node, rs_packet_cmp, _unmark_request, 0);
        if (!request_tree) {
                ERROR("Failed creating request tree");
                goto finish;
index c749049eef1999b19a6d404f9d716b57377d5375..8f231523cb2ff9728d8b10a42f4273d18e4ee1e5 100644 (file)
@@ -531,7 +531,7 @@ static fr_io_connection_t *fr_io_connection_alloc(fr_io_instance_t const *inst,
         *      #todo - unify the code with static clients?
         */
        if (inst->app_io->track_duplicates) {
-               MEM(connection->client->table = fr_rb_tree_talloc_alloc(client, fr_io_track_t, node,
+               MEM(connection->client->table = fr_rb_talloc_alloc(client, fr_io_track_t, node,
                                                                    track_connected_cmp, NULL, RB_FLAG_NONE));
        }
 
@@ -1463,7 +1463,7 @@ do_read:
                 */
                if (inst->app_io->track_duplicates) {
                        fr_assert(inst->app_io->compare != NULL);
-                       MEM(client->table = fr_rb_tree_talloc_alloc(client, fr_io_track_t, node, track_cmp,
+                       MEM(client->table = fr_rb_talloc_alloc(client, fr_io_track_t, node, track_cmp,
                                                                NULL, RB_FLAG_NONE));
                }
 
@@ -1475,7 +1475,7 @@ do_read:
                        fr_assert(client->state == PR_CLIENT_STATIC);
 
                        (void) pthread_mutex_init(&client->mutex, NULL);
-                       MEM(client->ht = fr_hash_table_create(client, connection_hash, connection_cmp, NULL));
+                       MEM(client->ht = fr_hash_table_alloc(client, connection_hash, connection_cmp, NULL));
                }
 
                /*
@@ -2470,7 +2470,7 @@ static ssize_t mod_write(fr_listen_t *li, void *packet_ctx, fr_time_t request_ti
                 *      defined.
                 */
                (void) pthread_mutex_init(&client->mutex, NULL);
-               MEM(client->ht = fr_hash_table_create(client, connection_hash, connection_cmp, NULL));
+               MEM(client->ht = fr_hash_table_alloc(client, connection_hash, connection_cmp, NULL));
 
        } else {
                /*
index 4ca6882f1675c92d43da15c941d25aa2e5e5908f..9ce96da76f913a57779150fd3c2a4ca19dc80c8c 100644 (file)
@@ -1663,13 +1663,13 @@ fr_network_t *fr_network_create(TALLOC_CTX *ctx, fr_event_list_t *el, char const
        /*
         *      Create the various heaps.
         */
-       nr->sockets = fr_rb_tree_talloc_alloc(nr, fr_network_socket_t, listen_node, socket_listen_cmp, NULL, rbflags);
+       nr->sockets = fr_rb_talloc_alloc(nr, fr_network_socket_t, listen_node, socket_listen_cmp, NULL, rbflags);
        if (!nr->sockets) {
                fr_strerror_const_push("Failed creating listen tree for sockets");
                goto fail2;
        }
 
-       nr->sockets_by_num = fr_rb_tree_talloc_alloc(nr, fr_network_socket_t, num_node, socket_num_cmp, NULL, rbflags);
+       nr->sockets_by_num = fr_rb_talloc_alloc(nr, fr_network_socket_t, num_node, socket_num_cmp, NULL, rbflags);
        if (!nr->sockets_by_num) {
                fr_strerror_const_push("Failed creating number tree for sockets");
                goto fail2;
index db1afa544e25c2bb2176f5f1f8ad362f8ef0f7c4..4d0f3442c302de0606665a06f6b7f61b54ef3d50 100644 (file)
@@ -1283,7 +1283,7 @@ nomem:
                goto fail;
        }
 
-       worker->dedup = fr_rb_tree_talloc_alloc(worker, request_t, dedup_node, worker_dedup_cmp, NULL, rbflags);
+       worker->dedup = fr_rb_talloc_alloc(worker, request_t, dedup_node, worker_dedup_cmp, NULL, rbflags);
        if (!worker->dedup) {
                fr_strerror_const("Failed creating de_dup tree");
                goto fail;
index 0e6c89b94f5b2c2eda96290ceb7bcf6e499342bc..2c813904922a566e9af7235b4a8af06e7e4e6177 100644 (file)
@@ -2305,7 +2305,7 @@ int cf_file_read(CONF_SECTION *cs, char const *filename)
        p = strrchr(cp->value, FR_DIR_SEP);
        if (p) *p = '\0';
 
-       MEM(tree = fr_rb_tree_talloc_alloc(cs, cf_file_t, node, _inode_cmp, NULL, 0));
+       MEM(tree = fr_rb_talloc_alloc(cs, cf_file_t, node, _inode_cmp, NULL, 0));
 
        cf_data_add(cs, tree, "filename", false);
 
index b26b77d8131a88039122f43eb06a97b69ed714ea..1d2dfc4a0afa8b5362039913e04051ba94d6bcb8 100644 (file)
@@ -287,7 +287,7 @@ bool client_add(RADCLIENT_LIST *clients, RADCLIENT *client)
 #else  /* WITH_TRIE */
 
        if (!clients->tree[client->ipaddr.prefix]) {
-               clients->tree[client->ipaddr.prefix] = fr_rb_tree_talloc_alloc(clients, RADCLIENT, node, client_cmp,
+               clients->tree[client->ipaddr.prefix] = fr_rb_talloc_alloc(clients, RADCLIENT, node, client_cmp,
                                                                           NULL, RB_FLAG_NONE);
                if (!clients->tree[client->ipaddr.prefix]) {
                        return false;
index d14a5a1b3160a241cd487c14111f3eb7333db450..629889b386aeb764c83fac3550346a28d24d57d0 100644 (file)
@@ -655,7 +655,7 @@ dl_module_loader_t *dl_module_loader_init(char const *lib_dir)
        }
        dl_search_path_prepend(dl_module_loader->dl_loader, lib_dir);
 
-       dl_module_loader->inst_data_tree = fr_rb_tree_talloc_alloc(dl_module_loader,
+       dl_module_loader->inst_data_tree = fr_rb_talloc_alloc(dl_module_loader,
                                                               dl_module_inst_t, node,
                                                               dl_module_inst_data_cmp, NULL, 0);
        if (!dl_module_loader->inst_data_tree) {
@@ -663,7 +663,7 @@ dl_module_loader_t *dl_module_loader_init(char const *lib_dir)
                goto error;
        }
 
-       dl_module_loader->module_tree = fr_rb_tree_talloc_alloc(dl_module_loader,
+       dl_module_loader->module_tree = fr_rb_talloc_alloc(dl_module_loader,
                                                            dl_module_t, node,
                                                            dl_module_cmp, NULL, 0);
        if (!dl_module_loader->inst_data_tree) {
index c1fb819926cad6358e195d5cfead655f6985f38a..46eec521c6350d6f37453783959a03dd51cea735 100644 (file)
@@ -117,7 +117,7 @@ int map_proc_register(void *mod_inst, char const *name,
        fr_assert(name && name[0]);
 
        if (!map_proc_root) {
-               map_proc_root = fr_rb_tree_talloc_alloc(NULL, map_proc_t, node,
+               map_proc_root = fr_rb_talloc_alloc(NULL, map_proc_t, node,
                                                    map_proc_cmp, _map_proc_tree_free, RB_FLAG_REPLACE);
                if (!map_proc_root) {
                        DEBUG("map_proc: Failed to create tree");
index 18bc0796fac3e9520d4811565ff6019544b4791a..923c569ddc7298fad7f4306535e3b5dab2891c85 100644 (file)
@@ -143,7 +143,7 @@ module_method_set_t *module_method_alloc_set(TALLOC_CTX *ctx)
        module_method_set_t *set;
 
        MEM(set = talloc_zero(ctx, module_method_set_t));
-       MEM(set->tree = fr_rb_tree_talloc_alloc(set, module_method_entry_t, node, module_method_cmp, NULL, 0));
+       MEM(set->tree = fr_rb_talloc_alloc(set, module_method_entry_t, node, module_method_cmp, NULL, 0));
        fr_dlist_talloc_init(&set->list, module_method_entry_t, entry);
 
        return set;
index 44b1f88aba71d4b4b9291cd324ce5f2a1b3027fb..8a1f62dd8578adde16d8ab81c06e683f8441d66d 100644 (file)
@@ -241,7 +241,7 @@ fr_state_tree_t *fr_state_tree_init(TALLOC_CTX *ctx, fr_dict_attr_t const *da, b
         *      are freed before it's destroyed.  Hence
         *      it being parented from the NULL ctx.
         */
-       state->tree = fr_rb_tree_talloc_alloc(NULL, fr_state_entry_t, node, state_entry_cmp, NULL, 0);
+       state->tree = fr_rb_talloc_alloc(NULL, fr_state_entry_t, node, state_entry_cmp, NULL, 0);
        if (!state->tree) {
                talloc_free(state);
                return NULL;
index 4b29c6092ac6097a1a0a75b5324e442092104c9b..77c7b926f6c0a768a0afcd63f5f5347a88eee93b 100644 (file)
@@ -149,7 +149,7 @@ int trigger_exec_init(CONF_SECTION const *cs)
                return 0;
        }
 
-       MEM(trigger_last_fired_tree = fr_rb_tree_talloc_alloc(talloc_null_ctx(),
+       MEM(trigger_last_fired_tree = fr_rb_talloc_alloc(talloc_null_ctx(),
                                                          trigger_last_fired_t, node,
                                                          _trigger_last_fired_cmp, _trigger_last_fired_free, 0));
 
index fb498e71272f9bcc7733d491a1d66d727b57caf5..334691a7c3ba842eac49539ae695a08477e8de85 100644 (file)
@@ -1224,7 +1224,7 @@ int virtual_namespace_register(char const *namespace, fr_dict_t const *dict,
                 *      so it shouldn't be parented from
                 *      virtual_server_root.
                 */
-               MEM(vns_tree = fr_rb_tree_talloc_alloc(NULL,
+               MEM(vns_tree = fr_rb_talloc_alloc(NULL,
                                                   fr_virtual_namespace_t, node,
                                                   _virtual_namespace_cmp,
                                                   _virtual_namespace_free, RB_FLAG_REPLACE));
index 7c11483edb72e4280a4f78aa55b81ecc22192bdb..db151b0ec6fe635a6ac9ff33419f72311e1ed309 100644 (file)
@@ -3075,7 +3075,7 @@ int xlat_init(void)
        /*
         *      Create the function tree
         */
-       xlat_root = fr_rb_tree_talloc_alloc(NULL, xlat_t, node, xlat_cmp, _xlat_func_tree_free, RB_FLAG_REPLACE);
+       xlat_root = fr_rb_talloc_alloc(NULL, xlat_t, node, xlat_cmp, _xlat_func_tree_free, RB_FLAG_REPLACE);
        if (!xlat_root) {
                ERROR("%s: Failed to create tree", __FUNCTION__);
                return -1;
index 0c6753411ee29aba310751dedaec51fb78013c75..00cc0fbd9020821a290fd70d5a0f8c70944d18d7 100644 (file)
@@ -349,7 +349,7 @@ int xlat_thread_instantiate(TALLOC_CTX *ctx)
        if (!xlat_inst_tree) return 0;
 
        if (!xlat_thread_inst_tree) {
-               MEM(xlat_thread_inst_tree = fr_rb_tree_talloc_alloc(ctx, xlat_thread_inst_t, inst_node,
+               MEM(xlat_thread_inst_tree = fr_rb_talloc_alloc(ctx, xlat_thread_inst_t, inst_node,
                                                                _xlat_thread_inst_cmp, _xlat_thread_inst_free, 0));
        }
 
@@ -386,7 +386,7 @@ static int xlat_instantiate_init(void)
 {
        if (xlat_inst_tree) return 0;
 
-       xlat_inst_tree = fr_rb_tree_talloc_alloc(NULL, xlat_inst_t, inst_node,
+       xlat_inst_tree = fr_rb_talloc_alloc(NULL, xlat_inst_t, inst_node,
                                             _xlat_inst_cmp, _xlat_inst_free, RB_FLAG_NONE);
        if (!xlat_inst_tree) return -1;
 
index dc6b32446c161cde53b022c0377626fedbf26783..0e2bfc0505dce07770bc1ad3b75f33122c0cf5ac 100644 (file)
@@ -455,7 +455,7 @@ static inline CC_HINT(always_inline) int dict_attr_namespace_init(fr_dict_attr_t
         *      namespace hash table.
         */
        if (!ext->namespace) {
-               ext->namespace = fr_hash_table_create(*da_p, dict_attr_name_hash, dict_attr_name_cmp, NULL);
+               ext->namespace = fr_hash_table_alloc(*da_p, dict_attr_name_hash, dict_attr_name_cmp, NULL);
                if (!ext->namespace) {
                        fr_strerror_printf("Failed allocating \"namespace\" table");
                        return -1;
@@ -1222,13 +1222,13 @@ int dict_attr_enum_add_name(fr_dict_attr_t *da, char const *name,
         *      Initialise enumv hash tables
         */
        if (!ext->value_by_name || !ext->name_by_value) {
-               ext->value_by_name = fr_hash_table_create(da, dict_enum_name_hash, dict_enum_name_cmp, hash_pool_free);
+               ext->value_by_name = fr_hash_table_alloc(da, dict_enum_name_hash, dict_enum_name_cmp, hash_pool_free);
                if (!ext->value_by_name) {
                        fr_strerror_printf("Failed allocating \"value_by_name\" table");
                        return -1;
                }
 
-               ext->name_by_value = fr_hash_table_create(da, dict_enum_value_hash, dict_enum_value_cmp, NULL);
+               ext->name_by_value = fr_hash_table_alloc(da, dict_enum_value_hash, dict_enum_value_cmp, NULL);
                if (!ext->name_by_value) {
                        fr_strerror_printf("Failed allocating \"name_by_value\" table");
                        return -1;
@@ -2937,7 +2937,7 @@ fr_dict_t *dict_alloc(TALLOC_CTX *ctx)
         *      Create the table of vendor by name.   There MAY NOT
         *      be multiple vendors of the same name.
         */
-       dict->vendors_by_name = fr_hash_table_create(dict, dict_vendor_name_hash, dict_vendor_name_cmp, hash_pool_free);
+       dict->vendors_by_name = fr_hash_table_alloc(dict, dict_vendor_name_hash, dict_vendor_name_cmp, hash_pool_free);
        if (!dict->vendors_by_name) {
                fr_strerror_printf("Failed allocating \"vendors_by_name\" table");
                goto error;
@@ -2947,7 +2947,7 @@ fr_dict_t *dict_alloc(TALLOC_CTX *ctx)
         *      be vendors of the same value.  If there are, we
         *      pick the latest one.
         */
-       dict->vendors_by_num = fr_hash_table_create(dict, dict_vendor_pen_hash, dict_vendor_pen_cmp, NULL);
+       dict->vendors_by_num = fr_hash_table_alloc(dict, dict_vendor_pen_hash, dict_vendor_pen_cmp, NULL);
        if (!dict->vendors_by_num) {
                fr_strerror_printf("Failed allocating \"vendors_by_num\" table");
                goto error;
@@ -2956,7 +2956,7 @@ fr_dict_t *dict_alloc(TALLOC_CTX *ctx)
        /*
         *      Inter-dictionary reference caching
         */
-       dict->autoref = fr_hash_table_create(dict, dict_protocol_name_hash, dict_protocol_name_cmp, NULL);
+       dict->autoref = fr_hash_table_alloc(dict, dict_protocol_name_hash, dict_protocol_name_cmp, NULL);
        if (!dict->autoref) {
                fr_strerror_printf("Failed allocating \"autoref\" table");
                goto error;
@@ -3340,7 +3340,7 @@ fr_dict_gctx_t const *fr_dict_global_ctx_init(TALLOC_CTX *ctx, char const *dict_
                return NULL;
        }
 
-       new_ctx->protocol_by_name = fr_hash_table_create(new_ctx, dict_protocol_name_hash, dict_protocol_name_cmp, NULL);
+       new_ctx->protocol_by_name = fr_hash_table_alloc(new_ctx, dict_protocol_name_hash, dict_protocol_name_cmp, NULL);
        if (!new_ctx->protocol_by_name) {
                fr_strerror_const("Failed initializing protocol_by_name hash");
        error:
@@ -3348,7 +3348,7 @@ fr_dict_gctx_t const *fr_dict_global_ctx_init(TALLOC_CTX *ctx, char const *dict_
                return NULL;
        }
 
-       new_ctx->protocol_by_num = fr_hash_table_create(new_ctx, dict_protocol_num_hash, dict_protocol_num_cmp, NULL);
+       new_ctx->protocol_by_num = fr_hash_table_alloc(new_ctx, dict_protocol_num_hash, dict_protocol_num_cmp, NULL);
        if (!new_ctx->protocol_by_num) {
                fr_strerror_const("Failed initializing protocol_by_num hash");
                goto error;
index feca5ac48ffbcdcf659e74683fb7d7ef9a2844d6..06a6e32e17cd26ac415e316b69fba301d7c9b264 100644 (file)
@@ -795,7 +795,7 @@ dl_loader_t *dl_loader_init(TALLOC_CTX *ctx, void *uctx, bool uctx_free, bool de
                return NULL;
        }
 
-       dl_loader->tree = fr_rb_tree_talloc_alloc(dl_loader, dl_t, node, dl_handle_cmp, NULL, 0);
+       dl_loader->tree = fr_rb_talloc_alloc(dl_loader, dl_t, node, dl_handle_cmp, NULL, 0);
        if (!dl_loader->tree) {
                fr_strerror_const("Failed initialising dl->tree");
        error:
index 7cfe21e3eb787cc9951452be8dd667d27710a4da..a93fd7ccfdb0ad0aab482ded31468d41f030388c 100644 (file)
@@ -2281,7 +2281,7 @@ fr_event_list_t *fr_event_list_alloc(TALLOC_CTX *ctx, fr_event_status_cb_t statu
                return NULL;
        }
 
-       el->fds = fr_rb_tree_talloc_alloc(el, fr_event_fd_t, node, fr_event_fd_cmp, NULL, 0);
+       el->fds = fr_rb_talloc_alloc(el, fr_event_fd_t, node, fr_event_fd_cmp, NULL, 0);
        if (!el->fds) {
                fr_strerror_const("Failed allocating FD tree");
                goto error;
index 99afb17b43aee10e10532a539bc0a995aee98b3d..f36b6e9ead50b760e5632467371ac09180bdf2d7 100644 (file)
@@ -279,7 +279,7 @@ static int _fr_hash_table_free(fr_hash_table_t *ht)
  *
  *     Memory usage in bytes is (20/3) * number of entries.
  */
-fr_hash_table_t *fr_hash_table_create(TALLOC_CTX *ctx,
+fr_hash_table_t *fr_hash_table_alloc(TALLOC_CTX *ctx,
                                      fr_hash_t hash_func,
                                      fr_cmp_t cmp_func,
                                      fr_free_t free_func)
@@ -871,7 +871,7 @@ int main(int argc, char **argv)
        fr_hash_table_t *ht;
        int *array;
 
-       ht = fr_hash_table_create(NULL, hash_int, NULL, NULL);
+       ht = fr_hash_table_alloc(NULL, hash_int, NULL, NULL);
        if (!ht) {
                fprintf(stderr, "Hash create failed\n");
                fr_exit(1);
index 21e202471f8ebaa1a6ca326a6a9498c624bbd527..c967ef2e375af2caee419ca34870999881315e81 100644 (file)
@@ -54,7 +54,7 @@ uint32_t fr_hash_case_string(char const *p);
 typedef struct fr_hash_table_s fr_hash_table_t;
 typedef int (*fr_hash_table_walk_t)(void *data, void *uctx);
 
-fr_hash_table_t *fr_hash_table_create(TALLOC_CTX *ctx,
+fr_hash_table_t *fr_hash_table_alloc(TALLOC_CTX *ctx,
                                      fr_hash_t hashNode,
                                      fr_cmp_t cmpNode,
                                      fr_free_t freeNode);
index a7167a8f9011159178a7170a21a1fd59b0e41df8..4f2a466cfb144e003141e1baccf03eeda736c25e 100644 (file)
@@ -71,7 +71,7 @@ struct fr_rb_node_s {
  *     - A new rbtree on success.
  *     - NULL on failure.
  */
-#define                fr_rb_tree_talloc_alloc(_ctx, _type, _field, _cmp, _node_free, _flags) \
+#define                fr_rb_talloc_alloc(_ctx, _type, _field, _cmp, _node_free, _flags) \
                _Generic((((_type *)0)->_field), \
                        fr_rb_node_t: _fr_rb_alloc(_ctx, offsetof(_type, _field), #_type, _cmp, _node_free, _flags) \
                )
index 04aa389a5eb747e2d7dcb3c5d9a35bf73b260965..476fe7da2c342885ecb10bc32efcd5ade2427b1a 100644 (file)
@@ -1715,7 +1715,7 @@ static int bfd_socket_parse(CONF_SECTION *cs, rad_listen_t *this)
                }
        }
 
-       sock->session_tree = fr_rb_tree_talloc_alloc(sock, bfd_state_t, node, bfd_session_cmp, bfd_session_free, 0);
+       sock->session_tree = fr_rb_talloc_alloc(sock, bfd_state_t, node, bfd_session_cmp, bfd_session_free, 0);
        if (!sock->session_tree) {
                ERROR("Failed creating session tree!");
                return -1;
index 7666094acca7c7af20106ad0562c6be1288ca8dd..4b2517b87472d774cfc8298715e93af659a7d185 100644 (file)
@@ -994,7 +994,7 @@ int sync_state_init(fr_ldap_connection_t *conn, sync_config_t const *config,
         *      these are specific to the connection.
         */
        if (!conn->uctx) {
-               MEM(tree = fr_rb_tree_talloc_alloc(conn, sync_state_t, node, _sync_cmp, NULL, RB_FLAG_NONE));
+               MEM(tree = fr_rb_talloc_alloc(conn, sync_state_t, node, _sync_cmp, NULL, RB_FLAG_NONE));
                conn->uctx = tree;
        } else {
                tree = talloc_get_type_abort(conn->uctx, fr_rb_tree_t);
index e7261bec6fa94efe2f5b5f259e9741efc0ae9c78..1da924da76b65630696fee098c3adbf9898904dd 100644 (file)
@@ -108,7 +108,7 @@ static int mod_instantiate(void *instance, UNUSED CONF_SECTION *conf)
        /*
         *      The cache.
         */
-       driver->cache = fr_rb_tree_talloc_alloc(NULL, rlm_cache_rb_entry_t, node, cache_entry_cmp, NULL, 0);
+       driver->cache = fr_rb_talloc_alloc(NULL, rlm_cache_rb_entry_t, node, cache_entry_cmp, NULL, 0);
        if (!driver->cache) {
                ERROR("Failed to create cache");
                return -1;
index 39482d5c1f04da40505809a28cec6c6067f61bbc..59bc4451676a7d4bac82b82361d7f966d1240a98 100644 (file)
@@ -567,7 +567,7 @@ static int mod_bootstrap(void *instance, CONF_SECTION *conf)
            (inst->key_data_type == FR_TYPE_IPV6_ADDR) || (inst->key_data_type == FR_TYPE_IPV6_PREFIX)) {
                MEM(inst->trie = fr_trie_alloc(inst));
        } else {
-               MEM(inst->tree = fr_rb_tree_talloc_alloc(inst, rlm_csv_entry_t, node, csv_entry_cmp, NULL, 0));
+               MEM(inst->tree = fr_rb_talloc_alloc(inst, rlm_csv_entry_t, node, csv_entry_cmp, NULL, 0));
        }
 
        if ((*inst->index_field_name == ',') || (*inst->index_field_name == *inst->delimiter)) {
index ee2846745449018fc55ac9706e3061f0d8422abb..8a1d9840af0fb4f1095520ec5741244dee5706a6 100644 (file)
@@ -160,7 +160,7 @@ static int mod_instantiate(void *instance, CONF_SECTION *conf)
        if (cs) {
                CONF_ITEM       *ci;
 
-               inst->ht = fr_hash_table_create(inst, detail_hash, detail_cmp, NULL);
+               inst->ht = fr_hash_table_alloc(inst, detail_hash, detail_cmp, NULL);
 
                for (ci = cf_item_next(cs, NULL);
                     ci != NULL;
index 4c4e82df3c11d23215dd69bcc30bc81575f407a4..3707d881a0c79e114534fe09d2ec259701fa0e30 100644 (file)
@@ -1482,7 +1482,7 @@ static int parse_host(rlm_isc_dhcp_tokenizer_t *state, rlm_isc_dhcp_info_t *info
         *      thousands of "host" entries in the parent->child list.
         */
        if (!parent->hosts_by_ether) {
-               parent->hosts_by_ether = fr_hash_table_create(parent, host_ether_hash, host_ether_cmp, NULL);
+               parent->hosts_by_ether = fr_hash_table_alloc(parent, host_ether_hash, host_ether_cmp, NULL);
                if (!parent->hosts_by_ether) {
                        return -1;
                }
@@ -1499,7 +1499,7 @@ static int parse_host(rlm_isc_dhcp_tokenizer_t *state, rlm_isc_dhcp_info_t *info
         */
        if (my_uid) {
                if (!parent->hosts_by_uid) {
-                       parent->hosts_by_uid = fr_hash_table_create(parent, host_uid_hash, host_uid_cmp, NULL);
+                       parent->hosts_by_uid = fr_hash_table_alloc(parent, host_uid_hash, host_uid_cmp, NULL);
                        if (!parent->hosts_by_uid) {
                                return -1;
                        }
@@ -2192,10 +2192,10 @@ static int mod_instantiate(void *instance, CONF_SECTION *conf)
        fr_pair_list_init(&info->options);
        info->last = &(info->child);
 
-       inst->hosts_by_ether = fr_hash_table_create(inst, host_ether_hash, host_ether_cmp, NULL);
+       inst->hosts_by_ether = fr_hash_table_alloc(inst, host_ether_hash, host_ether_cmp, NULL);
        if (!inst->hosts_by_ether) return -1;
 
-       inst->hosts_by_uid = fr_hash_table_create(inst, host_uid_hash, host_uid_cmp, NULL);
+       inst->hosts_by_uid = fr_hash_table_alloc(inst, host_uid_hash, host_uid_cmp, NULL);
        if (!inst->hosts_by_uid) return -1;
 
        ret = read_file(inst, info, inst->filename);
index 3f00922b9c5136c007e9fee11a5c6b2be6b74d4b..d0da9cbfd11f074126ff0a024adea14ccce09ef9 100644 (file)
@@ -160,7 +160,7 @@ retry:
         *      If needed, allocate a subtree.
         */
        if (!tt->subtree[tt->next_id]) {
-               MEM(tt->subtree[tt->next_id] = fr_rb_tree_talloc_alloc(tt, radius_track_entry_t, node,
+               MEM(tt->subtree[tt->next_id] = fr_rb_talloc_alloc(tt, radius_track_entry_t, node,
                                                                   te_cmp, NULL, RB_FLAG_NONE));
        }
 
index 253335be05ee002da6f7cc901aab4cb26e360446..bc79eb20dd0f5068bcb7f2d41f9f1d49a004a34d 100644 (file)
@@ -451,7 +451,7 @@ static int mod_instantiate(void *instance, UNUSED CONF_SECTION *conf)
         *      Lookup sessions in the tree.  We don't free them in
         *      the tree, as that's taken care of elsewhere...
         */
-       inst->session_tree = fr_rb_tree_talloc_alloc(NULL, SECURID_SESSION, node, securid_session_cmp, NULL, 0);
+       inst->session_tree = fr_rb_talloc_alloc(NULL, SECURID_SESSION, node, securid_session_cmp, NULL, 0);
        if (!inst->session_tree) {
                ERROR("Cannot initialize session tree");
                return -1;
index df2b307f6e0a0398b43aa3966c06ee8e7b866eb1..3c07e8a7bd0bec600016dbd25a009e3a81488778 100644 (file)
@@ -376,7 +376,7 @@ int sigtran_sccp_global_init(void)
                return 0;
        }
 
-       txn_tree = fr_rb_tree_talloc_alloc(NULL, sigtran_transaction_t, node, sigtran_txn_cmp, false, 0);
+       txn_tree = fr_rb_talloc_alloc(NULL, sigtran_transaction_t, node, sigtran_txn_cmp, false, 0);
        if (!txn_tree) return -1;
 
        txn_tree_inst++;
index 6a9066f7c85ab8305d7a2e71fc4bf04264606aa1..da78b267e902c48ecb7d27e1ede88888c3772968 100644 (file)
@@ -352,8 +352,8 @@ static int mod_thread_instantiate(UNUSED CONF_SECTION const *cs, void *instance,
 
        t->inst = inst;
 
-       t->src = fr_rb_tree_talloc_alloc(t, rlm_stats_data_t, src_node, data_cmp, NULL, RB_FLAG_LOCK);
-       t->dst = fr_rb_tree_talloc_alloc(t, rlm_stats_data_t, dst_node, data_cmp, NULL, RB_FLAG_LOCK);
+       t->src = fr_rb_talloc_alloc(t, rlm_stats_data_t, src_node, data_cmp, NULL, RB_FLAG_LOCK);
+       t->dst = fr_rb_talloc_alloc(t, rlm_stats_data_t, dst_node, data_cmp, NULL, RB_FLAG_LOCK);
 
        pthread_mutex_lock(&inst->mutex);
        fr_dlist_insert_head(&inst->list, t);