0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-24 10:41:54 +00:00
bird/nest/notify.c

31 lines
609 B
C
Raw Normal View History

2019-03-07 16:17:34 +00:00
/*
* 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);
2019-03-07 16:17:34 +00:00
static void
listener_unsubscribe(resource *r)
{
LISTENER(void) *L = (LISTENER(void) *) r;
2019-03-07 16:17:34 +00:00
rem_node(&(L->n));
CALL(L->unsubscribe, L->self);
}
struct resclass listener_class = {
2019-03-07 16:17:34 +00:00
.name = "Listener",
.size = sizeof(LISTENER(void)),
2019-03-07 16:17:34 +00:00
.free = listener_unsubscribe,
.dump = NULL,
.lookup = NULL,
.memsize = NULL,
};