Merged in SPARK-1916-tag-37-sent-twice (pull request #129)
RTM. Fixes tag 37 duplication in SPARK-1916
This commit is contained in:
commit
cbbd678112
1 file changed
+4
-4
@@ -30,7 +30,7 @@ struct NativeOrder::PImpl {
|
||||
PImpl()
|
||||
: services(nullptr), session_services(), sec(nullptr),
|
||||
previous_position_contribution(0), definition(), state(),
|
||||
price_encoding_precision(7), have_exchange_order_id(false) {}
|
||||
price_encoding_precision(7), received_exchanged_order_id(false) {}
|
||||
|
||||
OrderServices *services;
|
||||
SessionServices *session_services;
|
||||
@@ -41,7 +41,7 @@ struct NativeOrder::PImpl {
|
||||
OrderDefinition definition;
|
||||
OrderState state;
|
||||
int price_encoding_precision;
|
||||
bool have_exchange_order_id;
|
||||
bool received_exchanged_order_id;
|
||||
|
||||
jetfix::FIXFragment update_encoding;
|
||||
jetfix::FIXFragment::Bookmark<jetfix::fix::Price> update_price_bm;
|
||||
@@ -703,7 +703,7 @@ void NativeOrder::on_exe_report(const NewExecutionReportEvent &er) {
|
||||
|
||||
native_state.set_native_status(er.data->order_status);
|
||||
native_state.set_native_type(er.data->order_type);
|
||||
bool got_first_exchange_order_id = !me->have_exchange_order_id;
|
||||
bool got_first_exchange_order_id = !me->received_exchanged_order_id;
|
||||
if (got_first_exchange_order_id) {
|
||||
auto ts = to_trim_str(er.data->exchange_order_id.value());
|
||||
native_state.set_exchange_order_id(std::string(ts.first, ts.second));
|
||||
@@ -752,7 +752,6 @@ void NativeOrder::on_exe_report(const NewExecutionReportEvent &er) {
|
||||
// reported once, since they are both immutable, so we clear them
|
||||
// after their first report to make subsquent state updates faster
|
||||
if (got_first_exchange_order_id) {
|
||||
me->have_exchange_order_id = true;
|
||||
native_state.clear_exchange_order_id();
|
||||
native_state.mutable_routing_record()->Clear();
|
||||
}
|
||||
@@ -1003,6 +1002,7 @@ void NativeOrder::add_exchange_order_id_to_fix() {
|
||||
|
||||
me->update_encoding.add<jetfix::fix::OrderID>(eoid);
|
||||
me->cancel_encoding.add<jetfix::fix::OrderID>(eoid);
|
||||
me->received_exchanged_order_id = true;
|
||||
}
|
||||
|
||||
OrderStatus map_external_status(NativeOrderStatus status) {
|
||||
|
||||
Reference in new issue
Block a user