+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* IS-IS Rout(e)ing protocol - LSP TX Queuing logic
*
* Copyright (C) 2018 Christian Franke
*
* This file is part of FRRouting (FRR)
- *
- * FRR is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2, or (at your option) any
- * later version.
- *
- * FRR is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
struct isis_lsp *lsp;
enum isis_tx_type type;
bool is_retry;
- struct thread *retry;
+ struct event *retry;
struct isis_tx_queue *queue;
};
void isis_tx_queue_free(struct isis_tx_queue *queue)
{
- hash_clean(queue->hash, tx_queue_element_free);
- hash_free(queue->hash);
+ hash_clean_and_free(&queue->hash, tx_queue_element_free);
XFREE(MTYPE_TX_QUEUE, queue);
}
return hash_lookup(queue->hash, &e);
}
-static void tx_queue_send_event(struct thread *thread)
+static void tx_queue_send_event(struct event *thread)
{
struct isis_tx_queue_entry *e = THREAD_ARG(thread);
struct isis_tx_queue *queue = e->queue;
- thread_add_timer(master, tx_queue_send_event, e, 5, &e->retry);
+ event_add_timer(master, tx_queue_send_event, e, 5, &e->retry);
if (e->is_retry)
queue->circuit->area->lsp_rxmt_count++;
e->type = type;
THREAD_OFF(e->retry);
- thread_add_event(master, tx_queue_send_event, e, 0, &e->retry);
+ event_add_event(master, tx_queue_send_event, e, 0, &e->retry);
e->is_retry = false;
}