summaryrefslogtreecommitdiff
path: root/ospfd/ospf_ldp_sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_ldp_sync.c')
-rw-r--r--ospfd/ospf_ldp_sync.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/ospfd/ospf_ldp_sync.c b/ospfd/ospf_ldp_sync.c
index 7471ba7ba2..90c482468c 100644
--- a/ospfd/ospf_ldp_sync.c
+++ b/ospfd/ospf_ldp_sync.c
@@ -1032,9 +1032,7 @@ DEFPY (show_ip_ospf_mpls_ldp_interface,
ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT);
if (ospf == NULL || !ospf->oi_running) {
if (uj) {
- 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);
} else
vty_out(vty, "%% OSPF instance not found\n");
return CMD_SUCCESS;
@@ -1042,9 +1040,7 @@ DEFPY (show_ip_ospf_mpls_ldp_interface,
if (!CHECK_FLAG(ospf->ldp_sync_cmd.flags, LDP_SYNC_FLAG_ENABLE)) {
if (uj) {
- 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);
} else
vty_out(vty, "LDP-sync is disabled\n");
return CMD_SUCCESS;
@@ -1053,9 +1049,7 @@ DEFPY (show_ip_ospf_mpls_ldp_interface,
ret = show_ip_ospf_mpls_ldp_interface_common(vty, ospf, intf_name,
json, uj);
if (uj) {
- 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;