void qdr_core_remove_address_config(qdr_core_t *core, qdr_address_config_t *addr) { // Remove the address from the list and the hash index. qd_hash_remove_by_handle(core->addr_hash, addr->hash_handle); DEQ_REMOVE(core->addr_config, addr); // Free resources associated with this address. if (addr->name) { free(addr->name); } qd_hash_handle_free(addr->hash_handle); free_qdr_address_config_t(addr); }
void qdr_core_remove_address_config(qdr_core_t *core, qdr_address_config_t *addr) { qd_iterator_t *pattern = qd_iterator_string(addr->pattern, ITER_VIEW_ALL); // Remove the address from the list and the parse tree DEQ_REMOVE(core->addr_config, addr); qd_parse_tree_remove_pattern(core->addr_parse_tree, pattern); // Free resources associated with this address. if (addr->name) { free(addr->name); } qd_iterator_free(pattern); free(addr->pattern); free_qdr_address_config_t(addr); }
static void free_address_config(qdr_address_config_t *addr) { free(addr->name); free(addr->pattern); free_qdr_address_config_t(addr); }