The format has been changed in
c8b8b858bbba to match the JSON format
used when compiled with Jansson. Some users may want to revert this
change. Add `--enable-json0` option for that.
+lldpd (0.9.6)
+ * Change:
+ + Add a compile-time option to restore pre-0.9.2 JSON format (when
+ using json-c). Use `--enable-json0` to enable this option.
+
lldpd (0.9.5)
* Change:
+ More Ethernet media supported. However, RFC4836 is quite
lldp_CHECK_JANSSON
lldp_CHECK_JSONC
fi
+lldp_ARG_ENABLE([json0], [use of pre-0.9.2 JSON/json-c format], [no])
# Seccomp
AC_ARG_WITH([seccomp],
static json_t*
jansson_cleanup(json_t *el)
{
- json_t *new;
if (el == NULL) return NULL;
+#ifndef ENABLE_JSON0
+ json_t *new;
if (json_is_array(el) && json_array_size(el) == 1) {
new = json_array_get(el, 0);
return jansson_cleanup(new);
}
return new;
}
+#endif
json_incref(el);
return el;
}
static json_object*
jsonc_cleanup(json_object *el)
{
- json_object *new;
if (el == NULL) return NULL;
+#ifndef ENABLE_JSON0
+ json_object *new;
if (json_object_get_type(el) == json_type_array) {
size_t len = json_object_array_length(el);
if (len == 1) {
}
return new;
}
+#endif
json_object_get(el);
return el;
}