From 5bac1a6577423c09fb28b8e13937294fef576cf5 Mon Sep 17 00:00:00 2001 From: Akio Fukubayashi Date: Wed, 4 Sep 2019 18:15:00 +0900 Subject: Fix json Signed-off-by: Akio Fukubayashi --- libnavi/src/JsonResponseAnalyzer.cpp | 4 ---- src/api.cpp | 8 -------- src/binder_reply.cpp | 2 -- 3 files changed, 14 deletions(-) diff --git a/libnavi/src/JsonResponseAnalyzer.cpp b/libnavi/src/JsonResponseAnalyzer.cpp index b0d943f..ff92835 100644 --- a/libnavi/src/JsonResponseAnalyzer.cpp +++ b/libnavi/src/JsonResponseAnalyzer.cpp @@ -88,7 +88,6 @@ std::map< int32_t, naviapi::variant > JsonResponseAnalyzer::AnalyzeResponseGetPo } } - json_object_put(json_obj); return ret; } @@ -146,7 +145,6 @@ std::vector< uint32_t > JsonResponseAnalyzer::AnalyzeResponseGetAllRoutes( std:: } } - json_object_put(json_obj); return routeList; } @@ -182,7 +180,6 @@ uint32_t JsonResponseAnalyzer::AnalyzeResponseCreateRoute( std::string& res_json } } - json_object_put(json_obj); return routeHandle; } @@ -248,7 +245,6 @@ std::map JsonResponseAnalyzer::AnalyzeResponseGetAllSessi } } - json_object_put(json_obj); return session_map; } diff --git a/src/api.cpp b/src/api.cpp index 879feb0..27a8a49 100644 --- a/src/api.cpp +++ b/src/api.cpp @@ -87,8 +87,6 @@ void OnRequestNavicoreGetPosition(afb_req_t req) afb_req_fail(req, "failed", "navicore_getposition Bad Request"); } - // Json object release - json_object_put(response.json_data); AFB_API_NOTICE(req->api, "<-- End %s()", __func__); } @@ -130,8 +128,6 @@ void OnRequestNavicoreGetAllRoutes(afb_req_t req) afb_req_fail(req, "failed", "navicore_getallroutes Bad Request"); } - // json object release - json_object_put(response.json_data); AFB_API_NOTICE(req->api, "<-- End %s()", __func__); } @@ -182,8 +178,6 @@ void OnRequestNavicoreCreateRoute(afb_req_t req) afb_req_fail(req, "failed", "navicore_createroute Bad Request"); } - // json object release - json_object_put(response.json_data); AFB_API_NOTICE(req->api, "<-- End %s()", __func__); } @@ -454,8 +448,6 @@ void OnRequestNavicoreGetAllSessions(afb_req_t req) afb_req_fail(req, "failed", "navicore_getallsessions Bad Request"); } - // json object release - json_object_put(response.json_data); AFB_API_NOTICE(req->api, "<-- End %s()", __func__); } diff --git a/src/binder_reply.cpp b/src/binder_reply.cpp index 172a22a..6d28bbb 100644 --- a/src/binder_reply.cpp +++ b/src/binder_reply.cpp @@ -74,7 +74,6 @@ APIResponse BinderReply::ReplyNavicoreGetPosition( std::map& po default: fprintf(stderr, "Unknown key."); - json_object_put(obj); break; } } @@ -157,7 +156,6 @@ APIResponse BinderReply::ReplyNavicoreGetAllSessions( std::map