Commit b64fd3ad authored by Marek Vavrusa's avatar Marek Vavrusa

Removed more unused functions.

parent ddcda4a3
......@@ -1847,41 +1847,6 @@ int zones_store_changesets(knot_zone_t *zone, knot_changesets_t *src, journal_t
/*----------------------------------------------------------------------------*/
int zones_xfr_load_changesets(knot_ns_xfr_t *xfr, uint32_t serial_from,
uint32_t serial_to)
{
if (!xfr || !xfr->zone || !knot_zone_contents(xfr->zone)) {
return KNOT_EINVAL;
}
knot_changesets_t *chgsets = knot_changesets_create();
CHECK_ALLOC_LOG(chgsets, KNOT_ENOMEM);
int ret = ns_serial_compare(serial_to, serial_from);
dbg_zones_verb("Compared serials, result: %d\n", ret);
/* if serial_to is not larger than serial_from, do not load anything */
if (ret <= 0) {
xfr->data = chgsets;
return KNOT_EOK;
}
dbg_xfr_verb("xfr: loading changesets\n");
ret = zones_load_changesets(xfr->zone, chgsets,
serial_from, serial_to);
if (ret != KNOT_EOK) {
dbg_xfr("xfr: failed to load changesets: %s\n",
knot_strerror(ret));
knot_changesets_free(&chgsets);
return ret;
}
xfr->data = chgsets;
return KNOT_EOK;
}
/*----------------------------------------------------------------------------*/
int zones_create_changeset(const knot_zone_t *old_zone,
const knot_zone_t *new_zone,
knot_changeset_t *changeset)
......
......@@ -550,16 +550,6 @@ const knot_pktsection_t *knot_pkt_section(const knot_pkt_t *pkt, knot_section_t
return &pkt->sections[section_id];
}
const knot_rrset_t *knot_pkt_get_last(const knot_pkt_t *pkt)
{
dbg_packet("%s(%p)\n", __func__, pkt);
if (pkt && pkt->rrset_count > 0) {
return pkt->rr[pkt->rrset_count - 1];
} else {
return NULL;
}
}
int knot_pkt_parse(knot_pkt_t *pkt, unsigned flags)
{
dbg_packet("%s(%p, %u)\n", __func__, pkt, flags);
......
......@@ -225,12 +225,6 @@ int knot_pkt_put(knot_pkt_t *pkt, uint16_t compress, const knot_rrset_t *rr, uin
/*! \brief Get description of the given packet section. */
const knot_pktsection_t *knot_pkt_section(const knot_pkt_t *pkt, knot_section_t section_id);
/*!
* \brief Get last parsed RR.
* \note Legacy API, used only for incoming transfers.
*/
const knot_rrset_t *knot_pkt_get_last(const knot_pkt_t *pkt);
/*
* Packet parsing API.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment