From 0d72bb47d40c860b1d1ee1346dc71aae1ea3eaff Mon Sep 17 00:00:00 2001 From: Kevin Darby Date: Mon, 27 Nov 2017 18:08:41 -0500 Subject: [PATCH] clarify porfolio_id / account --- src/server/sparkd/position/MarginServiceCore.cpp | 8 ++++---- src/server/sparkd/position/MarginServiceCore.h | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/server/sparkd/position/MarginServiceCore.cpp b/src/server/sparkd/position/MarginServiceCore.cpp index 2780a406f..8b39a9fdb 100644 --- a/src/server/sparkd/position/MarginServiceCore.cpp +++ b/src/server/sparkd/position/MarginServiceCore.cpp @@ -157,7 +157,7 @@ struct MarginServiceCore::PImpl trades_node = child.append_child("string"); } - bool parse_margin_response(const CurlMsg& msg, std::string& account, std::string& calculation_id) + bool parse_margin_response(const CurlMsg& msg, std::string& portfolio_id, std::string& calculation_id) { std::string str(msg.data.begin(), msg.data.end()); pugi::xml_document doc; @@ -167,7 +167,7 @@ struct MarginServiceCore::PImpl child = child.child("margin"); if(child) { - account = child.attribute("portfolioId").as_string(); + portfolio_id = child.attribute("portfolioId").as_string(); calculation_id = child.attribute("id").as_string(); return true; } @@ -229,8 +229,8 @@ struct MarginServiceCore::PImpl { CurlMsg reply; post(post_margin_path, xml, reply); - std::string account_resp, calcid_resp; - if(parse_margin_response(reply, account_resp, calcid_resp)) + std::string portid_resp, calcid_resp; + if(parse_margin_response(reply, portid_resp, calcid_resp)) { CurlMsg reply2; if(get(get_margin_path + calcid_resp, reply2)) diff --git a/src/server/sparkd/position/MarginServiceCore.h b/src/server/sparkd/position/MarginServiceCore.h index 9ff573d83..469074dc1 100644 --- a/src/server/sparkd/position/MarginServiceCore.h +++ b/src/server/sparkd/position/MarginServiceCore.h @@ -22,6 +22,7 @@ public: //This is a blocking call to a WebAPI. Very Slow. bool query_margin(const orderman::AccountName&, MarginResult&); + //This is a blocking call to a WebAPI. Very Slow. bool query_margin(const std::vector&, MarginResult&); private: