Deleted Added
full compact
33c33
< * $Begemot: bsnmp/snmp_mibII/mibII_ipaddr.c,v 1.7 2003/12/03 10:01:19 hbb Exp $
---
> * $Begemot: bsnmp/snmp_mibII/mibII_ipaddr.c,v 1.8 2004/04/13 14:58:46 novo Exp $
141,155d140
< * Remove an IP address from an interface. This is called when
< * the SET finishes.
< */
< static void
< destroy_func(struct snmp_context *ctx __unused, int fail __unused, void *arg)
< {
< struct mibifa *ifa = arg;
<
< if (ifa->flags & MIBIFA_DESTROYED) {
< TAILQ_REMOVE(&mibifa_list, ifa, link);
< free(ifa);
< }
< }
<
< /*
158c143
< * only in the finish function.
---
> * only in the FINISH operation.
161c146,147
< destroy(struct snmp_context *ctx, struct update *upd, struct mibifa *ifa)
---
> destroy(struct snmp_context *ctx __unused, struct update *upd,
> struct mibifa *ifa)
165,169d150
< if (snmp_set_atfinish(ctx, destroy_func, ifa)) {
< syslog(LOG_ERR, "atfinish: %m");
< mib_undestroy_ifa(ifa);
< return (SNMP_ERR_GENERR);
< }
221a203,211
>
> case SNMP_DEPOP_FINISH:
> if ((upd->rb & RB_DESTROY) &&
> (ifa = mib_find_ifa(upd->addr)) != NULL &&
> (ifa->flags & MIBIFA_DESTROYED)) {
> TAILQ_REMOVE(&mibifa_list, ifa, link);
> free(ifa);
> }
> return (SNMP_ERR_NOERROR);