diff --git a/src/lib/api/service_helpers/AdminServiceUtils.cpp b/src/lib/api/service_helpers/AdminServiceUtils.cpp index 6cacbe7e8..bd7570cab 100644 --- a/src/lib/api/service_helpers/AdminServiceUtils.cpp +++ b/src/lib/api/service_helpers/AdminServiceUtils.cpp @@ -189,7 +189,7 @@ void AdminServiceUtils::fill_connections_from_config(bts::api::admin::AdminData& add_connection(admin_data,connection); break; case config::JetFIX::Connection::ICE: - connection.mutable_ice_connection()->set_sender_comp_id(c.sender_compid()); + connection.mutable_ice_connection()->set_sender_compid(c.sender_compid()); add_connection(admin_data,connection); break; @@ -469,7 +469,7 @@ bts::api::orderman::RoutingRecord AdminServiceUtils::get_routing_record(const bt return rv; } rv.set_session(conn_ptr->name()); - rv.set_sender_compid(conn_ptr->ice_connection().sender_comp_id()); + rv.set_sender_compid(conn_ptr->ice_connection().sender_compid()); rv.set_account(ice_account_data->clearing_account()); rv.set_operator_id(ice_user_data->operator_id()); rv.set_cti_code(ice_account_data->cti()); diff --git a/src/lib/api/services/AdminService.proto b/src/lib/api/services/AdminService.proto index b6faec1da..39d9cfc0b 100644 --- a/src/lib/api/services/AdminService.proto +++ b/src/lib/api/services/AdminService.proto @@ -326,7 +326,7 @@ message SIMUserData { /********************************ICE Data*********************************/ message ICEConnection { - string sender_comp_id = 10; + string sender_compid = 10; } message ICEAccountData { diff --git a/src/lib/orderman/orders/ICENativeOrder.cpp b/src/lib/orderman/orders/ICENativeOrder.cpp index 8f15175d3..3981eb75c 100644 --- a/src/lib/orderman/orders/ICENativeOrder.cpp +++ b/src/lib/orderman/orders/ICENativeOrder.cpp @@ -45,7 +45,7 @@ struct ICENativeOrder::PImpl OrderState state; int price_encoding_precision; std::string exchange_order_id; - std::string sender_comp_id; + std::string sender_compid; jetfix::FIXFragment update_encoding; jetfix::FIXFragment::Bookmark update_price_bm; @@ -111,7 +111,7 @@ void ICENativeOrder::on_init_new(const OrderDefinition& def, const PreActivation transition(ORDER_STATUS_INACTIVE); auto &native_state = get_native_state(me->state); *native_state.mutable_routing_record() = rq.routing_record; - me->sender_comp_id = rq.routing_record.sender_compid(); + me->sender_compid = rq.routing_record.sender_compid(); init_fix(); } else @@ -134,7 +134,7 @@ void ICENativeOrder::on_init_recovered(const OrderRecord& rec, const PreActivati me->previous_position_contribution = Quantity(rec.state().filled_quantity()); auto const &native_state = get_native_state(me->state); - me->sender_comp_id = native_state.routing_record().sender_compid(); + me->sender_compid = native_state.routing_record().sender_compid(); switch (me->state.status()) { case ORDER_STATUS_WORKING: @@ -652,7 +652,7 @@ void ICENativeOrder::on_attached(api::orderman::OrderDefinition const &new_paren auto &native_state = get_native_state(me->state); *native_state.mutable_routing_record() = rq.routing_record; - me->sender_comp_id = rq.routing_record.sender_compid(); + me->sender_compid = rq.routing_record.sender_compid(); init_fix(); if (has_exchange_order_id()) add_exchange_order_id_to_fix(); @@ -979,12 +979,12 @@ void ICENativeOrder::report_state() int ICENativeOrder::get_clordid(uint32_t bts_id) { std::string orderid = std::to_string(bts_id); - int totalsz = me->sender_comp_id.size() + orderid.size(); + int totalsz = me->sender_compid.size() + orderid.size(); if(totalsz < 9) //9 is min size orderid = std::string(9-totalsz, '0').append(orderid); else if(totalsz > 12) //12 is max orderid = orderid.substr(totalsz-12, orderid.size() - (totalsz-12)); - std::string combined_clorid = me->sender_comp_id + orderid; + std::string combined_clorid = me->sender_compid+ orderid; int id = std::atoi(combined_clorid.c_str()); return id; }