forked from Mirror/frr
isisd, lib: Cleanup linked list associated with snmp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
db986aded4
commit
208c53c90e
|
@ -2826,6 +2826,13 @@ static int isis_snmp_init(struct event_loop *tm)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int isis_snmp_terminate(void)
|
||||||
|
{
|
||||||
|
smux_terminate();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ISIS notification functions: we have one function per notification
|
* ISIS notification functions: we have one function per notification
|
||||||
*/
|
*/
|
||||||
|
@ -3448,6 +3455,7 @@ static int isis_snmp_module_init(void)
|
||||||
hook_register(isis_circuit_del_hook, isis_circuit_snmp_id_free);
|
hook_register(isis_circuit_del_hook, isis_circuit_snmp_id_free);
|
||||||
|
|
||||||
hook_register(frr_late_init, isis_snmp_init);
|
hook_register(frr_late_init, isis_snmp_init);
|
||||||
|
hook_register(frr_fini, isis_snmp_terminate);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -377,4 +377,9 @@ void smux_events_update(void)
|
||||||
agentx_events_update();
|
agentx_events_update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void smux_terminate(void)
|
||||||
|
{
|
||||||
|
if (events)
|
||||||
|
list_delete(&events);
|
||||||
|
}
|
||||||
#endif /* SNMP_AGENTX */
|
#endif /* SNMP_AGENTX */
|
||||||
|
|
|
@ -101,6 +101,7 @@ extern bool smux_enabled(void);
|
||||||
|
|
||||||
extern void libagentx_init(void);
|
extern void libagentx_init(void);
|
||||||
extern void smux_init(struct event_loop *tm);
|
extern void smux_init(struct event_loop *tm);
|
||||||
|
extern void smux_terminate(void);
|
||||||
extern void smux_agentx_enable(void);
|
extern void smux_agentx_enable(void);
|
||||||
extern void smux_register_mib(const char *, struct variable *, size_t, int,
|
extern void smux_register_mib(const char *, struct variable *, size_t, int,
|
||||||
oid[], size_t);
|
oid[], size_t);
|
||||||
|
|
Loading…
Reference in a new issue