mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 23:53:28 +00:00
ldpd: Convert vty_out to vty_json for JSON
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
This commit is contained in:
parent
382dcab318
commit
038c0a8fcf
@ -1844,9 +1844,7 @@ ldp_vty_dispatch(struct vty *vty, struct imsgbuf *ibuf, enum show_command cmd,
|
||||
done:
|
||||
close(ibuf->fd);
|
||||
if (json) {
|
||||
vty_out (vty, "%s\n",
|
||||
json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));
|
||||
json_object_free(json);
|
||||
vty_json(vty, json);
|
||||
}
|
||||
|
||||
return (ret);
|
||||
@ -2006,9 +2004,7 @@ ldp_vty_show_capabilities(struct vty *vty, const char *json)
|
||||
"0x0603");
|
||||
json_object_array_add(json_array, json_cap);
|
||||
|
||||
vty_out (vty, "%s\n",
|
||||
json_object_to_json_string_ext(json, JSON_C_TO_STRING_PRETTY));
|
||||
json_object_free(json);
|
||||
vty_json(vty, json);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user