From: Vincent Bernat Date: Sun, 16 Dec 2012 12:35:21 +0000 (+0100) Subject: snmp: don't send traps when SNMP is not enabled X-Git-Tag: 0.7.0~65 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be6db89386e18a3a58070f2f5c6f326988921960;p=thirdparty%2Flldpd.git snmp: don't send traps when SNMP is not enabled --- diff --git a/src/daemon/agent.c b/src/daemon/agent.c index 2e8a85cd..5bc37737 100644 --- a/src/daemon/agent.c +++ b/src/daemon/agent.c @@ -1722,6 +1722,8 @@ agent_notify(struct lldpd_hardware *hardware, int type, netsnmp_variable_list *notification_vars = NULL; + if (!hardware->h_cfg->g_snmp) return; + TAILQ_FOREACH(h, &hardware->h_cfg->g_hardware, h_entries) { inserts += h->h_insert_cnt; deletes += h->h_delete_cnt;