sizeof(struct lldpd_dot3_power));
}
#endif
+ if (set->custom_list_clear) {
+ log_debug("rpc", "requested custom TLVs clear");
+ lldpd_custom_list_cleanup(port);
+ } else
+ if (set->custom) {
+ struct lldpd_custom *custom;
+ log_debug("rpc", "requested custom TLV add");
+ if ((custom = malloc(sizeof(struct lldpd_custom)))) {
+ memcpy(custom, set->custom, sizeof(struct lldpd_custom));
+ TAILQ_INSERT_TAIL(&port->p_custom_list, custom, next);
+ } else
+ log_warn("rpc", "could not allocate memory for custom TLV");
+ }
+
ret = 1;
break;
}
#endif
#ifdef ENABLE_DOT3
free(set->dot3_power);
+#endif
+#ifdef ENABLE_CUSTOM
+ free(set->custom);
#endif
return 0;
}