void qdr_route_del_auto_link_CT(qdr_core_t *core, qdr_auto_link_t *al) { // // Disassociate from the connection identifier. Check to see if the identifier // should be removed. // qdr_conn_identifier_t *cid = al->conn_id; if (cid) { qdr_connection_ref_t * cref = DEQ_HEAD(cid->connection_refs); while (cref) { qdr_auto_link_deactivate_CT(core, al, cref->conn); cref = DEQ_NEXT(cref); } DEQ_REMOVE_N(REF, cid->auto_link_refs, al); qdr_route_check_id_for_deletion_CT(core, cid); } // // Disassociate the auto link from its address. Check to see if the address // should be removed. // qdr_address_t *addr = al->addr; if (addr && --addr->ref_count == 0) qdr_check_addr_CT(core, addr, false); // // Remove the auto link from the core list. // DEQ_REMOVE(core->auto_links, al); free(al->name); free(al->external_addr); free_qdr_auto_link_t(al); }
void qdr_route_del_link_route_CT(qdr_core_t *core, qdr_link_route_t *lr) { // // Disassociate from the connection identifier. Check to see if the identifier // should be removed. // qdr_conn_identifier_t *cid = lr->conn_id; if (cid) { if (!!cid->open_connection) qdr_link_route_deactivate_CT(core, lr, cid->open_connection); DEQ_REMOVE_N(REF, cid->link_route_refs, lr); qdr_route_check_id_for_deletion_CT(core, cid); } // // Disassociate the link route from its address. Check to see if the address // should be removed. // qdr_address_t *addr = lr->addr; if (addr && --addr->ref_count == 0) qdr_check_addr_CT(core, addr, false); // // Remove the link route from the core list. // DEQ_REMOVE(core->link_routes, lr); free(lr->name); free_qdr_link_route_t(lr); }
void qdr_core_delete_auto_link(qdr_core_t *core, qdr_auto_link_t *al) { if (al->conn_id) { DEQ_REMOVE_N(REF, al->conn_id->auto_link_refs, al); qdr_route_check_id_for_deletion_CT(core, al->conn_id); } qdr_address_t *addr = al->addr; if (addr && --addr->ref_count == 0) qdr_check_addr_CT(core, addr); free(al->name); free(al->external_addr); qdr_core_timer_free_CT(core, al->retry_timer); free_qdr_auto_link_t(al); }
void qdr_core_delete_link_route(qdr_core_t *core, qdr_link_route_t *lr) { if (lr->conn_id) { DEQ_REMOVE_N(REF, lr->conn_id->link_route_refs, lr); qdr_route_check_id_for_deletion_CT(core, lr->conn_id); } if (lr->addr) { if (--lr->addr->ref_count == 0) { qdr_check_addr_CT(core, lr->addr); } } free(lr->add_prefix); free(lr->del_prefix); free(lr->name); free(lr->pattern); free_qdr_link_route_t(lr); }