diff --git a/src/api/api.c b/src/api/api.c index 9aa0fc73..f031871d 100644 --- a/src/api/api.c +++ b/src/api/api.c @@ -146,5 +146,5 @@ static int api_endpoints(struct ftl_conn *api) JSON_ADD_ITEM_TO_OBJECT(json, "endpoints", endpoints); // Send response - JSON_SEND_OBJECT_UNLOCK(json); + JSON_SEND_OBJECT(json); } diff --git a/src/api/ftl.c b/src/api/ftl.c index 239eaa2e..2201ffb0 100644 --- a/src/api/ftl.c +++ b/src/api/ftl.c @@ -794,7 +794,6 @@ static int json_iface(struct ftl_conn *api, struct if_info *iface, cJSON *json) int api_ftl_interfaces(struct ftl_conn *api) { cJSON *json = JSON_NEW_OBJECT(); - cJSON *gateway = JSON_NEW_OBJECT(); cJSON *interfaces = JSON_NEW_ARRAY(); // Get interface with default route @@ -802,11 +801,6 @@ int api_ftl_interfaces(struct ftl_conn *api) char default_iface[IF_NAMESIZE] = { 0 }; getDefaultInterface(default_iface, &gw); - const char *gwaddr = inet_ntoa(*(struct in_addr *) &gw); - JSON_COPY_STR_TO_OBJECT(gateway, "address", gwaddr); - JSON_REF_STR_IN_OBJECT(gateway, "interface", default_iface); - JSON_ADD_ITEM_TO_OBJECT(json, "gateway", gateway); - // Enumerate and list interfaces struct if_info *ifinfo = NULL; if(!listInterfaces(&ifinfo, default_iface))