0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-23 18:21:54 +00:00
bird/nest/notify.c
2019-03-11 22:23:20 +01:00

31 lines
609 B
C

/*
* BIRD Internet Routing Daemon -- Notificators and Listeners
*
* (c) 2019 Maria Matejka <mq@jmq.cz>
*
* Can be freely distributed and used under the terms of the GNU GPL.
*/
#include "nest/bird.h"
#include "lib/resource.h"
#include "nest/notify.h"
LISTENER_DECL(void);
static void
listener_unsubscribe(resource *r)
{
LISTENER(void) *L = (LISTENER(void) *) r;
rem_node(&(L->n));
CALL(L->unsubscribe, L->self);
}
struct resclass listener_class = {
.name = "Listener",
.size = sizeof(LISTENER(void)),
.free = listener_unsubscribe,
.dump = NULL,
.lookup = NULL,
.memsize = NULL,
};