From 4d60376cb166c1b41e4ba1530538be240a728181 Mon Sep 17 00:00:00 2001 From: Eric Harding Date: Wed, 20 Mar 2019 10:43:46 -0400 Subject: [PATCH 01/24] SPARK-2179 Spark login screen should show error message instead of blank --- src/client/spark/view/Shell/Login/LoginModel.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/client/spark/view/Shell/Login/LoginModel.cs b/src/client/spark/view/Shell/Login/LoginModel.cs index 20e770318..53377e9d3 100644 --- a/src/client/spark/view/Shell/Login/LoginModel.cs +++ b/src/client/spark/view/Shell/Login/LoginModel.cs @@ -106,7 +106,13 @@ namespace mbts.ui.shell { var auth = _ctx.locate(); var response = await auth.get_users_async(new GetUsersRequest()); if (response.success) { - Users = response.value.Users.Select(x => new User(x.Login,x.Id)).OrderBy(u => u.name).ToArray(); + if (!string.IsNullOrEmpty(response.value.Error)) { + ErrorMessage = response.value.Error; + HasFatalError = true; + } + else { + Users = response.value.Users.Select(x => new User(x.Login,x.Id)).OrderBy(u => u.name).ToArray(); + } } else { ErrorMessage = "Logon: " + response.error_message; From 467dba98f8dfc700f62c227ba31ddd254b913ffa Mon Sep 17 00:00:00 2001 From: Michael Harding Date: Mon, 1 Apr 2019 17:06:16 -0400 Subject: [PATCH 02/24] Update Fills window test --- testing/manual/forms/fills.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/testing/manual/forms/fills.txt b/testing/manual/forms/fills.txt index ea3ea575f..ce130ffa7 100644 --- a/testing/manual/forms/fills.txt +++ b/testing/manual/forms/fills.txt @@ -3,9 +3,8 @@ Fills UI Test Start the form (Trading->Fills) -Make sure the following columns have filtered when the window starts: +Make sure the following columns have filters when the window starts: Fill Time: Since Open - Fill Kind: Standard, Leg Cross an order, get a fill and make sure it shows up Test sorting and filtering From 369b89b3a74baf8b09a32b58ee76d9833f48c480 Mon Sep 17 00:00:00 2001 From: Eric Harding Date: Tue, 2 Apr 2019 15:15:12 -0400 Subject: [PATCH 03/24] Update default symbol list for compat with deployed config --- src/lib/config/defaults/Symbols.conf | 97 +++++++++++++++++++--------- 1 file changed, 67 insertions(+), 30 deletions(-) diff --git a/src/lib/config/defaults/Symbols.conf b/src/lib/config/defaults/Symbols.conf index 147e5c917..8494cc578 100644 --- a/src/lib/config/defaults/Symbols.conf +++ b/src/lib/config/defaults/Symbols.conf @@ -1,11 +1,71 @@ -SymbolLists -{ - value + +SymbolList { + value { + # This key is here for backwards compatability ONLY. + # If you need to update symbols you should update SymbolLists (plural) + symbol: "6B" + symbol: "6E" + symbol: "6J" + symbol: "6P" + symbol: "ARE" + symbol: "BK" + symbol: "BOB" + symbol: "BUB" + symbol: "BZ" + symbol: "CL" + symbol: "EH" + symbol: "ES" + symbol: "FYT" + symbol: "FOB" + symbol: "GC" + symbol: "GE" + symbol: "GLI" + symbol: "HE" + symbol: "HG" + symbol: "HO" + symbol: "KE" + symbol: "LE" + symbol: "NB" + symbol: "NBY" + symbol: "NOB" + symbol: "NON" + symbol: "NG" + symbol: "NQ" + symbol: "NUB" + symbol: "RB" + symbol: "SI" + symbol: "SOM" + symbol: "SR1" + symbol: "SR3" + symbol: "TN" + symbol: "TUF" + symbol: "TUT" + symbol: "UB" + symbol: "XC" + symbol: "XK" + symbol: "YM" + symbol: "ZB" + symbol: "ZC" + symbol: "ZCW" + symbol: "ZF" + symbol: "ZL" + symbol: "ZM" + symbol: "ZN" + symbol: "ZO" + symbol: "ZQ" + symbol: "ZR" + symbol: "ZS" + symbol: "ZT" + symbol: "ZW" + } +} +SymbolLists +{ + value { list { key: "ICE" - # symbol: "BRN" # symbol: "WBS" # symbol: "OJ" @@ -13,31 +73,8 @@ SymbolLists list { key: "GLBX" - - symbol: "HE" - symbol: "LE" - symbol: "CL" - symbol: "RB" - symbol: "HO" - symbol: "BZ" - symbol: "NG" - symbol: "GC" - symbol: "SI" - symbol: "HG" - symbol: "ZW" - symbol: "ZC" - symbol: "ZS" - symbol: "ZM" - symbol: "ZL" - symbol: "ZO" - symbol: "ZR" - symbol: "ZB" - symbol: "ZN" - symbol: "ZF" - symbol: "ZT" - symbol: "UB" - symbol: "GE" - } + symbol: @SymbolList.symbol + } } } @@ -74,6 +111,6 @@ Symbols { ice { future: @SymbolLists.list[ICE].symbol spread: @SymbolLists.list[ICE].symbol - } + } } } From 6d0eb627124b9c201d7cd9a08dedc6a5f846e9cd Mon Sep 17 00:00:00 2001 From: Kevin Darby Date: Tue, 2 Apr 2019 15:55:29 -0400 Subject: [PATCH 04/24] changes to compile ice work with clang --- src/lib/md/ice/ICEUtils.cpp | 4 +-- src/server/sparkd/md/platforms/IMDPlatform.h | 3 +- .../md/platforms/ice_onixs/ICEListener.cpp | 36 ++++++------------- .../sparkd/md/platforms/ice_onixs/ICEMain.cpp | 1 - 4 files changed, 14 insertions(+), 30 deletions(-) diff --git a/src/lib/md/ice/ICEUtils.cpp b/src/lib/md/ice/ICEUtils.cpp index d25fb696a..1533964a0 100644 --- a/src/lib/md/ice/ICEUtils.cpp +++ b/src/lib/md/ice/ICEUtils.cpp @@ -26,7 +26,7 @@ std::string ICEChannel::to_string() const { std::string mt = name; for(const auto& x : market_types) - mt += " " + x; + mt += " " + std::to_string(x); return mt; } @@ -123,4 +123,4 @@ const std::vector get_configured_ice_channels() { }}} //namespace -#endif \ No newline at end of file +#endif diff --git a/src/server/sparkd/md/platforms/IMDPlatform.h b/src/server/sparkd/md/platforms/IMDPlatform.h index df4840f30..fb36c9168 100644 --- a/src/server/sparkd/md/platforms/IMDPlatform.h +++ b/src/server/sparkd/md/platforms/IMDPlatform.h @@ -7,6 +7,7 @@ class IMDPlatform { public: virtual void send_heartbeats(); + virtual ~IMDPlatform() {} }; -}} \ No newline at end of file +}} diff --git a/src/server/sparkd/md/platforms/ice_onixs/ICEListener.cpp b/src/server/sparkd/md/platforms/ice_onixs/ICEListener.cpp index df13de9bb..7c85642ad 100644 --- a/src/server/sparkd/md/platforms/ice_onixs/ICEListener.cpp +++ b/src/server/sparkd/md/platforms/ice_onixs/ICEListener.cpp @@ -56,17 +56,14 @@ void ICEListener::onMarketStateChange(const onixs_ice::MarketStateChange& , cons void ICEListener::onError(const onixs_ice::Error& error) { std::string error_desc(error.description()); - tracepoint (bts_trace,trace_order,(char*) "onError", 0, (uint16_t) 0, 0); LOG(md,Warn, "OnixS ICE Error: {} - {}", error.toString(), error_desc ); } void ICEListener::onFeedError(onixs_ice::FeedId feedid, onixs_ice::ErrorCode code, const std::string& desc) { - tracepoint (bts_trace,trace_order,(char*) "onFeedError", 0, (uint16_t) 0, 0); LOG(md,Warn, "OnixS ICE FeedError: {} - {}", feedid, desc, code); } void ICEListener::onWarning(const onixs_ice::Warning& warning) { - tracepoint (bts_trace,trace_order,(char*) "onWarning", 0, (uint16_t) 0, 0); LOG(md,Warn, "OnixS ICE Warn: {} - {}", warning.toString(), std::string(warning.description()) ); } @@ -74,31 +71,27 @@ void ICEListener::onWarning(const onixs_ice::Warning& warning) // Security discovery void ICEListener::onFuturesProductDefinition(const onixs_ice::FuturesProductDefinition& msg, bool& is_interested) { - tracepoint (bts_trace,trace_order,(char*) "onFuturesProductDefinition", 0, (uint16_t) 0, 0); if(msg.isSpread) on_future_strip(msg, is_interested); else on_future(msg, is_interested); } -void ICEListener::onNewExpiry(const onixs_ice::NewExpiry& msg, bool& is_interested, const onixs_ice::MessageInfo& msg_info) +void ICEListener::onNewExpiry(const onixs_ice::NewExpiry& msg, bool& is_interested, const onixs_ice::MessageInfo& ) { - tracepoint (bts_trace,trace_order,(char*) "onNewExpiry", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0); on_future(msg, is_interested); } void ICEListener::onFuturesStrategyDefinition(const onixs_ice::FuturesStrategyDefinition& def, bool& is_interested) { - tracepoint (bts_trace,trace_order,(char*) "onFuturesStrategyDefinition", 0, (uint16_t) 0, 0); //TODO need to find out how to produce data for testing //on_uds_future_spread(def, is_interested); UNUSED(def); UNUSED(is_interested); } //This is only for UDS -void ICEListener::onNewFuturesStrategyDefinition(const onixs_ice::NewFuturesStrategyDefinition& msg, bool& is_interested, const onixs_ice::MessageInfo& msg_info) +void ICEListener::onNewFuturesStrategyDefinition(const onixs_ice::NewFuturesStrategyDefinition& msg, bool& is_interested, const onixs_ice::MessageInfo& ) { - tracepoint (bts_trace,trace_order,(char*) "onFuturesStrategyDefinition", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0); //TODO need to find out how to produce data for testing //on_uds_future_spread(msg, is_interested); UNUSED(msg); @@ -152,7 +145,7 @@ void ICEListener::onMarketSnapshotPriceLevel(const onixs_ice::MarketSnapshotPric // Book void ICEListener::onOrderBookUpdated(const onixs_ice::OrderBook& onixs_book, const onixs_ice::MessageInfo& msg_info) { - tracepoint (bts_trace,trace_order,(char*) "onBookUpdate", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0); + //tracepoint (bts_trace,trace_order,(char*) "onBookUpdate", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0); auto data = _index.get_security(onixs_book.marketId()); if (data == nullptr) @@ -214,9 +207,8 @@ void on_trade(ICESecurityData* data, const onixs_ice::Price& price, int size, on data->handle.add_trade(ts, ps, date, map_aggressor(agside), size); } -void ICEListener::onTrade(const onixs_ice::Trade& msg, const onixs_ice::MessageInfo& msg_info) +void ICEListener::onTrade(const onixs_ice::Trade& msg, const onixs_ice::MessageInfo& ) { - tracepoint (bts_trace,trace_order,(char*) "onTrade", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0); auto* data = _index.get_security(msg.marketId); if (data != NULL) { @@ -230,9 +222,8 @@ void ICEListener::onTrade(const onixs_ice::Trade& msg, const onixs_ice::MessageI // // RFQ -void ICEListener::onRfq(const onixs_ice::Rfq& msg, const onixs_ice::MessageInfo& msg_info) +void ICEListener::onRfq(const onixs_ice::Rfq& msg, const onixs_ice::MessageInfo& ) { - tracepoint (bts_trace,trace_order,(char*) "onRfq", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0); auto* data = _index.get_security(msg.marketId); if (data != nullptr) { @@ -267,9 +258,8 @@ void ICEListener::onRfq(const onixs_ice::Rfq& msg, const onixs_ice::MessageInfo& // // Misc -void ICEListener::onSettlementPrice(const onixs_ice::SettlementPrice& msg, const onixs_ice::MessageInfo& msg_info) +void ICEListener::onSettlementPrice(const onixs_ice::SettlementPrice& msg, const onixs_ice::MessageInfo& ) { - tracepoint (bts_trace,trace_order,(char*) "onSettlementPrice", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0); auto* data = _index.get_security(msg.marketId); if (data != nullptr) { @@ -287,9 +277,8 @@ void ICEListener::onOpenInterest(const onixs_ice::OpenInterest &msg, const onixs UNUSED(msg_info); } -void ICEListener::onOpenPrice(const onixs_ice::OpenPrice& msg, const onixs_ice::MessageInfo& msg_info) +void ICEListener::onOpenPrice(const onixs_ice::OpenPrice& msg, const onixs_ice::MessageInfo& ) { - tracepoint (bts_trace,trace_order,(char*) "onOpenPrice", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0); auto* data = _index.get_security(msg.marketId); if (data != nullptr) { @@ -301,9 +290,8 @@ void ICEListener::onOpenPrice(const onixs_ice::OpenPrice& msg, const onixs_ice:: } } -void ICEListener::onClosePrice(const onixs_ice::ClosePrice& msg, const onixs_ice::MessageInfo& msg_info) +void ICEListener::onClosePrice(const onixs_ice::ClosePrice& msg, const onixs_ice::MessageInfo& ) { - tracepoint (bts_trace,trace_order,(char*) "onClosePrice", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0); auto* data = _index.get_security(msg.marketId); if (data != nullptr) { @@ -315,9 +303,8 @@ void ICEListener::onClosePrice(const onixs_ice::ClosePrice& msg, const onixs_ice } } -void ICEListener::onEndOfDayMarketSummary(const onixs_ice::EndOfDayMarketSummary& msg, const onixs_ice::MessageInfo& msg_info) +void ICEListener::onEndOfDayMarketSummary(const onixs_ice::EndOfDayMarketSummary& msg, const onixs_ice::MessageInfo& ) { - tracepoint (bts_trace,trace_order,(char*) "onEndOfDayMarketSummary", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0); auto* data = _index.get_security(msg.marketId); if (data != nullptr) { @@ -333,18 +320,15 @@ void ICEListener::onEndOfDayMarketSummary(const onixs_ice::EndOfDayMarketSummary // // Feed -void ICEListener::onMulticastMessageBlockBegin(onixs_ice::FeedId feedId, const onixs_ice::MessageInfo& msg_info) +void ICEListener::onMulticastMessageBlockBegin(onixs_ice::FeedId feedId, const onixs_ice::MessageInfo& ) { UNUSED(feedId); - tracepoint (bts_trace,trace_order,(char*) "onMulticastMessageBlockBegin", (uint32_t)msg_info.sequenceNumber, (uint16_t) msg_info.sequenceNumber, 0); } void ICEListener::onMulticastMessageBlockEnd(onixs_ice::FeedId feedId, const onixs_ice::MarketIds& marketIds) { UNUSED(feedId); UNUSED(marketIds); - tracepoint (bts_trace,trace_order,(char*) "onMulticastMessageBlockEnd.begin", 0, (uint16_t) 0, 0); - tracepoint (bts_trace,trace_order,(char*) "onMulticastMessageBlockEnd.end", 0, (uint16_t) 0, 0); } void ICEListener::onFeedStarted(onixs_ice::FeedId, const onixs_ice::MarketIds&) diff --git a/src/server/sparkd/md/platforms/ice_onixs/ICEMain.cpp b/src/server/sparkd/md/platforms/ice_onixs/ICEMain.cpp index c44ad0d3a..f36be139d 100644 --- a/src/server/sparkd/md/platforms/ice_onixs/ICEMain.cpp +++ b/src/server/sparkd/md/platforms/ice_onixs/ICEMain.cpp @@ -217,7 +217,6 @@ unique_ptr ICEMain::prepare_listener(onixs_ice::Handler& handler, c producer_channels.push_back(_producer.get_channel(symbol.symbol().c_str(), symbol.type(), symbol.exchange())); } - const auto& options = channel_settings_for(channel); unique_ptr listener(new ICEListener(_index, _producer, /*_settlement_recorder,*/ producer_channels)); for (auto& symbol : channel.symbols) listener->add_filter_symbol(symbol.symbol()); From 25acf771ab73cb2faaba97924919c89ca913164a Mon Sep 17 00:00:00 2001 From: Kevin Darby Date: Tue, 2 Apr 2019 16:05:05 -0400 Subject: [PATCH 05/24] changes to conditionally start stunnel if the config file is present --- src/client/spark/App.xaml.cs | 28 ++++++++++++++++ .../core/NativeMethods/BTSNativeMethods.cs | 3 ++ src/client/spark_core/config/config.cs | 6 ++++ src/lib/os/os.cpp | 32 +++++++++++++++++++ src/lib/os/os.h | 2 ++ 5 files changed, 71 insertions(+) diff --git a/src/client/spark/App.xaml.cs b/src/client/spark/App.xaml.cs index d19652c96..07cb2e357 100644 --- a/src/client/spark/App.xaml.cs +++ b/src/client/spark/App.xaml.cs @@ -1,4 +1,6 @@ using System; +using System.IO; +using System.Diagnostics; using System.Collections.Generic; using System.ComponentModel; using System.Linq; @@ -72,10 +74,36 @@ namespace mbts.ui.shell base.OnExit(e); Environment.Exit(0); } + + Process _stunnel_process; + void init_stunnel(string[] argv) + { + var path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\BTS\\stunnel\\"; + if(File.Exists(path + "config\\stunnel.conf")) + { + try + { + BTSUINativeMethods.setup_process_job_object(); + _stunnel_process = Process.Start(path + "bin\\stunnel.exe"); + string config_error; bool success = false; + if(_stunnel_process != null) + { + for(int i = 0; i < 10; i++) + { + if(success = mbts.config.Configuration.try_initialize(out config_error)) + break; + System.Threading.Thread.Sleep(500); + } + } + } + catch {} //can't log here + } + } public new int Run() { var argv = Environment.GetCommandLineArgs(); try { + init_stunnel(argv); if (argv.Contains("-multiple") || _mutex == null || _mutex.WaitOne(TimeSpan.Zero, true)) { diff --git a/src/client/spark/core/NativeMethods/BTSNativeMethods.cs b/src/client/spark/core/NativeMethods/BTSNativeMethods.cs index 539f0d411..f522930b9 100644 --- a/src/client/spark/core/NativeMethods/BTSNativeMethods.cs +++ b/src/client/spark/core/NativeMethods/BTSNativeMethods.cs @@ -11,6 +11,9 @@ namespace mbts.ui.native [DllImport("libspark")] public static extern void enable_limits(); + [DllImport("libspark")] + public static extern void setup_process_job_object(); + [DllImport("libspark", CharSet = CharSet.Unicode)] public static extern void set_window_app_id(IntPtr hwnd, string stack_id); } diff --git a/src/client/spark_core/config/config.cs b/src/client/spark_core/config/config.cs index 287097bdd..abf97b268 100644 --- a/src/client/spark_core/config/config.cs +++ b/src/client/spark_core/config/config.cs @@ -51,6 +51,12 @@ namespace mbts.config reset(); initialize(); } + + public static bool try_initialize(out string error) + { + reset(); + return initialize(out error); + } //////////// /// private diff --git a/src/lib/os/os.cpp b/src/lib/os/os.cpp index d16966dcd..6aa71b92c 100755 --- a/src/lib/os/os.cpp +++ b/src/lib/os/os.cpp @@ -1000,6 +1000,38 @@ extern "C" BTS_EXPORT char *bts_data_path() { } extern "C" BTS_EXPORT void free_bts_data_path(char *dp) { delete[] dp; } + +extern "C" BTS_EXPORT void setup_process_job_object() +{ +#ifdef _WIN32 + if (IsDebuggerPresent()) + return; + HANDLE hjob = CreateJobObject(nullptr, nullptr); + if (hjob == nullptr) + { + //LOG(Warn, ui) << "Failed to create JOB object. Limits are not in force."; + return; + } + + JOBOBJECT_EXTENDED_LIMIT_INFORMATION jeli = {0}; + jeli.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE; + + BOOL success = SetInformationJobObject(hjob, JobObjectExtendedLimitInformation, &jeli, sizeof(jeli)); + DWORD error = GetLastError(); + if (!success) + { + //LOG(Warn, ui) << "Failed to set up limits - last error: " << error; + return; + } + success = AssignProcessToJobObject(hjob, GetCurrentProcess()); + error = GetLastError(); + // if (!success) + // { + // LOG(Warn, ui) << "Failed to assign job object. " << error; + // } +#endif +} + } } } // end namespaces diff --git a/src/lib/os/os.h b/src/lib/os/os.h index 5cfcbd910..d7312cc33 100755 --- a/src/lib/os/os.h +++ b/src/lib/os/os.h @@ -86,6 +86,8 @@ inline double nan () { return std::numeric_limits::quiet_NaN(); } BTS_EXPORT float fnan (); BTS_EXPORT bool is_finite(double d); int cache_size_l3_bytes(); + +extern "C" BTS_EXPORT int setup_process_job_object(); }} #endif From 3cff5343a36f275536b38eb4f94a1ac0d539da09 Mon Sep 17 00:00:00 2001 From: Kevin Darby Date: Tue, 2 Apr 2019 18:10:53 -0400 Subject: [PATCH 06/24] PR review and support of -multiple --- src/client/spark/App.xaml.cs | 17 ++++++++------ .../core/NativeMethods/BTSNativeMethods.cs | 2 +- .../spark/view/Shell/Login/LoginModel.cs | 4 ++-- src/lib/os/os.cpp | 23 +++++++------------ src/lib/os/os.h | 2 -- 5 files changed, 21 insertions(+), 27 deletions(-) diff --git a/src/client/spark/App.xaml.cs b/src/client/spark/App.xaml.cs index 07cb2e357..07eff0bb0 100644 --- a/src/client/spark/App.xaml.cs +++ b/src/client/spark/App.xaml.cs @@ -75,7 +75,8 @@ namespace mbts.ui.shell Environment.Exit(0); } - Process _stunnel_process; + Process _stunnel_process; + static internal string stunnel_job_error { get; private set;} void init_stunnel(string[] argv) { var path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\BTS\\stunnel\\"; @@ -83,7 +84,9 @@ namespace mbts.ui.shell { try { - BTSUINativeMethods.setup_process_job_object(); + uint job_error = BTSUINativeMethods.setup_process_job_object(); + if(job_error != 0) + stunnel_job_error = "Stunnel Job Error code: " + job_error; _stunnel_process = Process.Start(path + "bin\\stunnel.exe"); string config_error; bool success = false; if(_stunnel_process != null) @@ -102,11 +105,11 @@ namespace mbts.ui.shell public new int Run() { var argv = Environment.GetCommandLineArgs(); - try { - init_stunnel(argv); - if (argv.Contains("-multiple") || - _mutex == null || - _mutex.WaitOne(TimeSpan.Zero, true)) { + try { + if (argv.Contains("-multiple") || _mutex == null || _mutex.WaitOne(TimeSpan.Zero, true)) + { + if(_mutex == null || _mutex.WaitOne(TimeSpan.Zero, true)) + init_stunnel(argv); return base.Run(); } else { diff --git a/src/client/spark/core/NativeMethods/BTSNativeMethods.cs b/src/client/spark/core/NativeMethods/BTSNativeMethods.cs index f522930b9..baa11754c 100644 --- a/src/client/spark/core/NativeMethods/BTSNativeMethods.cs +++ b/src/client/spark/core/NativeMethods/BTSNativeMethods.cs @@ -12,7 +12,7 @@ namespace mbts.ui.native public static extern void enable_limits(); [DllImport("libspark")] - public static extern void setup_process_job_object(); + public static extern uint setup_process_job_object(); [DllImport("libspark", CharSet = CharSet.Unicode)] public static extern void set_window_app_id(IntPtr hwnd, string stack_id); diff --git a/src/client/spark/view/Shell/Login/LoginModel.cs b/src/client/spark/view/Shell/Login/LoginModel.cs index 20e770318..061add7e5 100644 --- a/src/client/spark/view/Shell/Login/LoginModel.cs +++ b/src/client/spark/view/Shell/Login/LoginModel.cs @@ -1,4 +1,4 @@ -using bts; + using bts; using bts.api; using bts.api.core; using bts.api.persistence; @@ -94,7 +94,7 @@ namespace mbts.ui.shell { Configuration.initialize(); } catch (ApplicationException e) { - ErrorMessage = e.Message; + ErrorMessage = (e.Message ?? string.Empty) + (App.stunnel_job_error ?? string.Empty); HasFatalError = true; return; } diff --git a/src/lib/os/os.cpp b/src/lib/os/os.cpp index 6aa71b92c..65f6437b0 100755 --- a/src/lib/os/os.cpp +++ b/src/lib/os/os.cpp @@ -1001,34 +1001,27 @@ extern "C" BTS_EXPORT char *bts_data_path() { extern "C" BTS_EXPORT void free_bts_data_path(char *dp) { delete[] dp; } -extern "C" BTS_EXPORT void setup_process_job_object() +extern "C" BTS_EXPORT unsigned int setup_process_job_object() { #ifdef _WIN32 if (IsDebuggerPresent()) - return; + return 0; HANDLE hjob = CreateJobObject(nullptr, nullptr); if (hjob == nullptr) - { - //LOG(Warn, ui) << "Failed to create JOB object. Limits are not in force."; - return; - } + return -1; //Failed to create JOB object. JOBOBJECT_EXTENDED_LIMIT_INFORMATION jeli = {0}; jeli.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE; BOOL success = SetInformationJobObject(hjob, JobObjectExtendedLimitInformation, &jeli, sizeof(jeli)); DWORD error = GetLastError(); - if (!success) - { - //LOG(Warn, ui) << "Failed to set up limits - last error: " << error; - return; - } + if(!success) + return error; success = AssignProcessToJobObject(hjob, GetCurrentProcess()); error = GetLastError(); - // if (!success) - // { - // LOG(Warn, ui) << "Failed to assign job object. " << error; - // } + if(!success) + return error; + return 0; #endif } diff --git a/src/lib/os/os.h b/src/lib/os/os.h index d7312cc33..5cfcbd910 100755 --- a/src/lib/os/os.h +++ b/src/lib/os/os.h @@ -86,8 +86,6 @@ inline double nan () { return std::numeric_limits::quiet_NaN(); } BTS_EXPORT float fnan (); BTS_EXPORT bool is_finite(double d); int cache_size_l3_bytes(); - -extern "C" BTS_EXPORT int setup_process_job_object(); }} #endif From 57fc50ce61c497cd95328299166eea80e17166f9 Mon Sep 17 00:00:00 2001 From: Kevin Darby Date: Tue, 2 Apr 2019 18:12:05 -0400 Subject: [PATCH 07/24] typo --- src/client/spark/view/Shell/Login/LoginModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/spark/view/Shell/Login/LoginModel.cs b/src/client/spark/view/Shell/Login/LoginModel.cs index 061add7e5..db5967be9 100644 --- a/src/client/spark/view/Shell/Login/LoginModel.cs +++ b/src/client/spark/view/Shell/Login/LoginModel.cs @@ -1,4 +1,4 @@ - using bts; +using bts; using bts.api; using bts.api.core; using bts.api.persistence; From 19c0b94803873275f705ddc861a000a5fbd12d0b Mon Sep 17 00:00:00 2001 From: Kevin Darby Date: Tue, 2 Apr 2019 18:13:31 -0400 Subject: [PATCH 08/24] unsigned... --- src/lib/os/os.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/os/os.cpp b/src/lib/os/os.cpp index 65f6437b0..05488954c 100755 --- a/src/lib/os/os.cpp +++ b/src/lib/os/os.cpp @@ -1008,7 +1008,7 @@ extern "C" BTS_EXPORT unsigned int setup_process_job_object() return 0; HANDLE hjob = CreateJobObject(nullptr, nullptr); if (hjob == nullptr) - return -1; //Failed to create JOB object. + return 100; //Failed to create JOB object. JOBOBJECT_EXTENDED_LIMIT_INFORMATION jeli = {0}; jeli.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE; From 4cf9d544aa2e14885f482b34a6d3c26366dc1b27 Mon Sep 17 00:00:00 2001 From: Michael Harding Date: Wed, 3 Apr 2019 09:44:10 -0400 Subject: [PATCH 09/24] Update PnL test --- testing/manual/positions_and_fills/PAndL.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/testing/manual/positions_and_fills/PAndL.txt b/testing/manual/positions_and_fills/PAndL.txt index 1970098f7..774a6af4b 100644 --- a/testing/manual/positions_and_fills/PAndL.txt +++ b/testing/manual/positions_and_fills/PAndL.txt @@ -17,12 +17,10 @@ and you may also want to clear your orders for a clean slate: Throughout the test we'll refer to accounts ACC A and ACC A1. These specific accounts aren't necessary, but rather that we have fills in multiple distinct accounts. Bring up the pnl form (empty). -Bring up a SIM:SI ladder form, pick your favorite expiration. It should be completely empty since we're controlling the md, and the ACC A account should be selected in the account drop down list. +Bring up a SIM:SI ladder form, pick your favorite expiration. It should be completely empty (just prices, no sizes) since we're controlling the md, and the ACC A account should be selected in the account drop down list. Bring up an order ticket for your corresponding ladder place a buy order with price 14.000 and qty 10 - your ladder should populate now - place a sell order with price 14.010 at qty 10 - this will give you a valid Midpoint for your PnL Price in the PnL + place a sell order with price 14.010 at qty 10 this will give you a valid Midpoint for your PnL Price in the PnL Sell a 1 lot at your bid (14.000) The Start Net Pos should be 0 Start Pnl should be 0 From 01128639ceddf62cb22d1fe3efd709de6fe5ccd9 Mon Sep 17 00:00:00 2001 From: Kevin Darby Date: Thu, 4 Apr 2019 13:05:40 -0400 Subject: [PATCH 10/24] improve error logging --- src/client/spark/App.xaml.cs | 36 +++++++++++-------- .../spark/view/Shell/Login/LoginModel.cs | 2 +- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/src/client/spark/App.xaml.cs b/src/client/spark/App.xaml.cs index 07eff0bb0..25aecff08 100644 --- a/src/client/spark/App.xaml.cs +++ b/src/client/spark/App.xaml.cs @@ -79,28 +79,36 @@ namespace mbts.ui.shell static internal string stunnel_job_error { get; private set;} void init_stunnel(string[] argv) { - var path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\BTS\\stunnel\\"; - if(File.Exists(path + "config\\stunnel.conf")) + try { - try + var path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\BTS\\stunnel\\"; + if (File.Exists(path + "config\\stunnel.conf")) { - uint job_error = BTSUINativeMethods.setup_process_job_object(); - if(job_error != 0) - stunnel_job_error = "Stunnel Job Error code: " + job_error; - _stunnel_process = Process.Start(path + "bin\\stunnel.exe"); - string config_error; bool success = false; - if(_stunnel_process != null) + uint job_error = BTSUINativeMethods.setup_process_job_object(); + if(job_error == 0) { - for(int i = 0; i < 10; i++) + _stunnel_process = Process.Start(path + "bin\\stunnel.exe"); + string config_error; bool success = false; + if(_stunnel_process != null) { - if(success = mbts.config.Configuration.try_initialize(out config_error)) - break; - System.Threading.Thread.Sleep(500); + for(int i = 0; i < 10; i++) + { + if(success = mbts.config.Configuration.try_initialize(out config_error)) + break; + System.Threading.Thread.Sleep(500); + } } + else + stunnel_job_error = "Stunnel Job Error code: " + job_error + " could not start stunnel"; } + else + stunnel_job_error = "Stunnel Job Error code: " + job_error; } - catch {} //can't log here } + catch(Exception ex) + { + stunnel_job_error = "Error starting stunnel: " + ex.Message; + } } public new int Run() { diff --git a/src/client/spark/view/Shell/Login/LoginModel.cs b/src/client/spark/view/Shell/Login/LoginModel.cs index db5967be9..c3a42f7fb 100644 --- a/src/client/spark/view/Shell/Login/LoginModel.cs +++ b/src/client/spark/view/Shell/Login/LoginModel.cs @@ -94,7 +94,7 @@ namespace mbts.ui.shell { Configuration.initialize(); } catch (ApplicationException e) { - ErrorMessage = (e.Message ?? string.Empty) + (App.stunnel_job_error ?? string.Empty); + ErrorMessage = (e.Message ?? string.Empty) + " " + (App.stunnel_job_error ?? string.Empty); HasFatalError = true; return; } From d24b7a3707d0d31b8ebe87d02200868a2a158842 Mon Sep 17 00:00:00 2001 From: Pedro Pinto Date: Fri, 5 Apr 2019 12:30:44 -0400 Subject: [PATCH 11/24] Possibly fixed SPARK-2225. This bug is probably behind a number of different crashes. --- src/lib/orderman/actors/order_manager/OrderServices.h | 2 ++ src/lib/orderman/orders/spreader_orders/SpreaderOrder.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/orderman/actors/order_manager/OrderServices.h b/src/lib/orderman/actors/order_manager/OrderServices.h index b86396787..0fb55a980 100644 --- a/src/lib/orderman/actors/order_manager/OrderServices.h +++ b/src/lib/orderman/actors/order_manager/OrderServices.h @@ -166,6 +166,8 @@ class OrderServices { void report_state(const api::orderman::OrderState &state, trace::CorID const &trace = trace::CorID()) { + bts_assert(state.status() != api::orderman::ORDER_STATUS_INACTIVE); + OrderStateUpdateEvent ev(_owner->key(), _owner->parent_key(), _owner->definition(), state, trace); _data->owner.publish(_data->report_order_state_pub, ev); diff --git a/src/lib/orderman/orders/spreader_orders/SpreaderOrder.cpp b/src/lib/orderman/orders/spreader_orders/SpreaderOrder.cpp index be6e2a953..804583d16 100644 --- a/src/lib/orderman/orders/spreader_orders/SpreaderOrder.cpp +++ b/src/lib/orderman/orders/spreader_orders/SpreaderOrder.cpp @@ -452,7 +452,7 @@ bts::api::orderman::OrderStatus SpreaderOrder::_get_order_status () const{ bts::api::orderman::OrderStatus::ORDER_STATUS_COMPLETED; case SpreaderState::START: case SpreaderState::WAITING_FOR_INIT_DATA: - return bts::api::orderman::OrderStatus::ORDER_STATUS_INACTIVE; + return bts::api::orderman::OrderStatus::ORDER_STATUS_WORKING; default: bts_assert(false); return bts::api::orderman::OrderStatus::ORDER_STATUS_INACTIVE; From 3d37dc481f9d54e4126c6b70c7f337df6b87bb92 Mon Sep 17 00:00:00 2001 From: John Colvin Date: Sat, 6 Apr 2019 14:39:39 -0500 Subject: [PATCH 12/24] SPARK-2192 NullRef when hitting enter in order ticket after typing in a qty then price --- .../spark/view/Extensions/TextElement/TextBoxBehavior.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/client/spark/view/Extensions/TextElement/TextBoxBehavior.cs b/src/client/spark/view/Extensions/TextElement/TextBoxBehavior.cs index 45ad9e0d8..e29b10a90 100644 --- a/src/client/spark/view/Extensions/TextElement/TextBoxBehavior.cs +++ b/src/client/spark/view/Extensions/TextElement/TextBoxBehavior.cs @@ -103,10 +103,8 @@ namespace mbts.ui { } static void tb_keydown(object sender, KeyEventArgs e) { - if (e.Key == Key.Enter) { - var binding = BindingOperations.GetBindingExpression(sender as DependencyObject, TextBox.TextProperty); - binding.UpdateSource(); - } + if (e.Key == Key.Enter) + BindingOperations.GetBindingExpression(sender as DependencyObject, TextBox.TextProperty)?.UpdateSource(); } public static bool GetCommitOnEnter(DependencyObject obj) => (bool)obj.GetValue(CommitOnEnterProperty); From 418a1078c2ca4592a6e215ae7c0bc84dce07b332 Mon Sep 17 00:00:00 2001 From: Pedro Pinto Date: Mon, 8 Apr 2019 09:17:20 -0400 Subject: [PATCH 13/24] Updated release notes. --- doc/user/content/release_notes/_index.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/user/content/release_notes/_index.md b/doc/user/content/release_notes/_index.md index 71d637fd7..7456cf4fd 100644 --- a/doc/user/content/release_notes/_index.md +++ b/doc/user/content/release_notes/_index.md @@ -4,6 +4,9 @@ weight = 3 sort_by = "weight" insert_anchor_links = "right" +++ +## 1.5.8 +### User Visible Changes + - Fixed a bug where it was possible to crash the UI by entering an order through the order ticket if Enter was used to dismiss the dialog. ## 1.5.7 ### User Visible Changes - New videos have been added to the manual describing the [Algo Studio](./bts_spark/Trading/index.md#algo-studio) and [Spreader](./bts_spark/Spreader/index.md) From f0d3cabd14364a084c510bf1e78bf092ea1fb289 Mon Sep 17 00:00:00 2001 From: Pedro Pinto Date: Mon, 8 Apr 2019 09:19:50 -0400 Subject: [PATCH 14/24] Updated release notes. --- doc/user/content/release_notes/_index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/user/content/release_notes/_index.md b/doc/user/content/release_notes/_index.md index 7456cf4fd..03f1c3830 100644 --- a/doc/user/content/release_notes/_index.md +++ b/doc/user/content/release_notes/_index.md @@ -7,6 +7,7 @@ insert_anchor_links = "right" ## 1.5.8 ### User Visible Changes - Fixed a bug where it was possible to crash the UI by entering an order through the order ticket if Enter was used to dismiss the dialog. + - Fixed a spreader reporting bug which could cause the server to crash if an algo was used to control certain types of synthetics ## 1.5.7 ### User Visible Changes - New videos have been added to the manual describing the [Algo Studio](./bts_spark/Trading/index.md#algo-studio) and [Spreader](./bts_spark/Spreader/index.md) From b0c52f542a399d6bb73f23432a7bae93ee288019 Mon Sep 17 00:00:00 2001 From: Pedro Pinto Date: Mon, 8 Apr 2019 09:23:21 -0400 Subject: [PATCH 15/24] Updated release notes. --- doc/user/content/release_notes/_index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/user/content/release_notes/_index.md b/doc/user/content/release_notes/_index.md index 03f1c3830..99cdec8e9 100644 --- a/doc/user/content/release_notes/_index.md +++ b/doc/user/content/release_notes/_index.md @@ -8,6 +8,7 @@ insert_anchor_links = "right" ### User Visible Changes - Fixed a bug where it was possible to crash the UI by entering an order through the order ticket if Enter was used to dismiss the dialog. - Fixed a spreader reporting bug which could cause the server to crash if an algo was used to control certain types of synthetics + - Improved user message when the UI fails to login ## 1.5.7 ### User Visible Changes - New videos have been added to the manual describing the [Algo Studio](./bts_spark/Trading/index.md#algo-studio) and [Spreader](./bts_spark/Spreader/index.md) From b570762054e5e54c91b8861d33dbe0713b2604ae Mon Sep 17 00:00:00 2001 From: Pedro Pinto Date: Mon, 8 Apr 2019 09:56:39 -0400 Subject: [PATCH 16/24] Updated release notes. --- doc/user/content/release_notes/_index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/user/content/release_notes/_index.md b/doc/user/content/release_notes/_index.md index 99cdec8e9..db2b50254 100644 --- a/doc/user/content/release_notes/_index.md +++ b/doc/user/content/release_notes/_index.md @@ -9,6 +9,7 @@ insert_anchor_links = "right" - Fixed a bug where it was possible to crash the UI by entering an order through the order ticket if Enter was used to dismiss the dialog. - Fixed a spreader reporting bug which could cause the server to crash if an algo was used to control certain types of synthetics - Improved user message when the UI fails to login + - Integrated stunnel into UI to make VPN setup unnecessary in unsecured environments. ## 1.5.7 ### User Visible Changes - New videos have been added to the manual describing the [Algo Studio](./bts_spark/Trading/index.md#algo-studio) and [Spreader](./bts_spark/Spreader/index.md) From 5b118d8fa06d3d2f72e4a06b2733477624b0e1ab Mon Sep 17 00:00:00 2001 From: Pedro Pinto Date: Mon, 8 Apr 2019 09:56:46 -0400 Subject: [PATCH 17/24] Fixed build. --- src/lib/os/os.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/os/os.cpp b/src/lib/os/os.cpp index 05488954c..3c8560047 100755 --- a/src/lib/os/os.cpp +++ b/src/lib/os/os.cpp @@ -1021,8 +1021,8 @@ extern "C" BTS_EXPORT unsigned int setup_process_job_object() error = GetLastError(); if(!success) return error; - return 0; #endif + return 0; } } From 5f9a421490d507e3a3d739f649e59bca0295014a Mon Sep 17 00:00:00 2001 From: Eric Harding Date: Thu, 11 Apr 2019 10:28:21 -0400 Subject: [PATCH 18/24] Additional logging for QueryServer::get_names error --- src/lib/md/relay/QueryServer.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/md/relay/QueryServer.cpp b/src/lib/md/relay/QueryServer.cpp index 7b409662f..306e51372 100644 --- a/src/lib/md/relay/QueryServer.cpp +++ b/src/lib/md/relay/QueryServer.cpp @@ -380,9 +380,8 @@ public: google::protobuf::MapPair v(h.handle.key(), security.ice().security_desc()); x->insert(v); } - else - { - LOG(md,Error, "Invalid ExchangeData_case {}", security.ExchangeData_case()); + else { + LOG(md,Error, "Invalid ExchangeData_case {} for security {}", security.ExchangeData_case(), h.handle.key()); } } } From 7381088d6d9b042826b10e09a6b96505da0230a8 Mon Sep 17 00:00:00 2001 From: Eric Harding Date: Thu, 11 Apr 2019 11:07:49 -0400 Subject: [PATCH 19/24] Remove unnecessary error log --- src/lib/md/relay/QueryServer.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib/md/relay/QueryServer.cpp b/src/lib/md/relay/QueryServer.cpp index 306e51372..64297f5b0 100644 --- a/src/lib/md/relay/QueryServer.cpp +++ b/src/lib/md/relay/QueryServer.cpp @@ -380,9 +380,7 @@ public: google::protobuf::MapPair v(h.handle.key(), security.ice().security_desc()); x->insert(v); } - else { - LOG(md,Error, "Invalid ExchangeData_case {} for security {}", security.ExchangeData_case(), h.handle.key()); - } + // There is currently no ExchangeData for synthetics } } } From 02d0f6191ce573fa2bdd2f2a9a715979ca43672e Mon Sep 17 00:00:00 2001 From: Kevin Darby Date: Thu, 18 Apr 2019 14:06:44 -0400 Subject: [PATCH 20/24] -added a manifest to our csproj that we'd meant to add anyway for win7 subprocess creation -added a fallback for stunnel if we can't create a windows job object --- src/client/spark/App.xaml.cs | 53 +++++++++++++++++++++++------------ src/client/spark/Spark.csproj | 3 +- 2 files changed, 37 insertions(+), 19 deletions(-) diff --git a/src/client/spark/App.xaml.cs b/src/client/spark/App.xaml.cs index 25aecff08..4fd7024dc 100644 --- a/src/client/spark/App.xaml.cs +++ b/src/client/spark/App.xaml.cs @@ -75,6 +75,37 @@ namespace mbts.ui.shell Environment.Exit(0); } + void start_stunnel(string path, uint job_error) + { + string config_error; + if (!mbts.config.Configuration.try_initialize(out config_error)) + { + _stunnel_process = Process.Start(path + "bin\\stunnel.exe"); + if (_stunnel_process != null) + { + for (int i = 0; i < 10; i++) + { + if (mbts.config.Configuration.try_initialize(out config_error)) + break; + System.Threading.Thread.Sleep(500); + } + } + else + stunnel_job_error = "Stunnel Job Error code: " + job_error + + " could not start stunnel " + (config_error ?? string.Empty); + } + } + + void kill_stunnel() + { + try + { + Process[] ps = Process.GetProcessesByName("stunnel"); + ps.ForEach(p => p.Kill()); + } + catch { } + } + Process _stunnel_process; static internal string stunnel_job_error { get; private set;} void init_stunnel(string[] argv) @@ -85,24 +116,10 @@ namespace mbts.ui.shell if (File.Exists(path + "config\\stunnel.conf")) { uint job_error = BTSUINativeMethods.setup_process_job_object(); - if(job_error == 0) - { - _stunnel_process = Process.Start(path + "bin\\stunnel.exe"); - string config_error; bool success = false; - if(_stunnel_process != null) - { - for(int i = 0; i < 10; i++) - { - if(success = mbts.config.Configuration.try_initialize(out config_error)) - break; - System.Threading.Thread.Sleep(500); - } - } - else - stunnel_job_error = "Stunnel Job Error code: " + job_error + " could not start stunnel"; - } - else - stunnel_job_error = "Stunnel Job Error code: " + job_error; + //if we can't put this process and stunnel into a job, try to stop stunnel then restart + if(job_error != 0) + kill_stunnel(); + start_stunnel(path, job_error); } } catch(Exception ex) diff --git a/src/client/spark/Spark.csproj b/src/client/spark/Spark.csproj index c6eb7e982..dbf62a939 100644 --- a/src/client/spark/Spark.csproj +++ b/src/client/spark/Spark.csproj @@ -4,7 +4,8 @@ Blue Trading Systems Blue Trading Systems Spark - The game has changed. Make your Move. + Advanced Derivatives Trading + spark.manifest true Debug;Release x64 From 546553406ba208b839c6ee855237cc7942a92e67 Mon Sep 17 00:00:00 2001 From: Kevin Darby Date: Thu, 18 Apr 2019 14:13:09 -0400 Subject: [PATCH 21/24] PR comments --- src/client/spark/App.xaml.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/client/spark/App.xaml.cs b/src/client/spark/App.xaml.cs index 4fd7024dc..36810c745 100644 --- a/src/client/spark/App.xaml.cs +++ b/src/client/spark/App.xaml.cs @@ -101,7 +101,14 @@ namespace mbts.ui.shell try { Process[] ps = Process.GetProcessesByName("stunnel"); - ps.ForEach(p => p.Kill()); + ps.ForEach(p => + { + try + { + p.Kill(); + } + catch {} + }); } catch { } } From 7838bdf04f7119c0d65f26a68dcbd5ccbeb43ca0 Mon Sep 17 00:00:00 2001 From: Kevin Darby Date: Thu, 18 Apr 2019 14:16:08 -0400 Subject: [PATCH 22/24] too much whitespace for even me --- src/client/spark/App.xaml.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/client/spark/App.xaml.cs b/src/client/spark/App.xaml.cs index 36810c745..ea2b1de78 100644 --- a/src/client/spark/App.xaml.cs +++ b/src/client/spark/App.xaml.cs @@ -103,10 +103,7 @@ namespace mbts.ui.shell Process[] ps = Process.GetProcessesByName("stunnel"); ps.ForEach(p => { - try - { - p.Kill(); - } + try { p.Kill(); } catch {} }); } From 5b71918a1f465d18af13893035224af8f546a5a8 Mon Sep 17 00:00:00 2001 From: Eric Harding Date: Mon, 22 Apr 2019 16:41:48 -0400 Subject: [PATCH 23/24] Revert "Make sure every sparkcmd command respects -configserver" This reverts commit dab95d7e91a02fd8ddb1cccdcdafddf3ce8a784f. --- src/client/sparkcmd/Program.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/client/sparkcmd/Program.cs b/src/client/sparkcmd/Program.cs index 790308e27..c4b3c8cd3 100644 --- a/src/client/sparkcmd/Program.cs +++ b/src/client/sparkcmd/Program.cs @@ -9,7 +9,6 @@ using System.Linq; namespace sparkcmd { class Program { static int Main(string[] args) { - mbts.config.Configuration.initialize(); var commands = ConsoleCommandDispatcher.FindCommandsInSameAssemblyAs(typeof(Program)); return ConsoleCommandDispatcher.DispatchCommand(commands, args, Console.Out); } From 80e337c5996ecc9b61cf77c41051ddf2278159a6 Mon Sep 17 00:00:00 2001 From: Eric Harding Date: Mon, 22 Apr 2019 16:45:36 -0400 Subject: [PATCH 24/24] sparkcmd should respect '-configserver' --- src/client/sparkcmd/Program.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/client/sparkcmd/Program.cs b/src/client/sparkcmd/Program.cs index c4b3c8cd3..504ce8daf 100644 --- a/src/client/sparkcmd/Program.cs +++ b/src/client/sparkcmd/Program.cs @@ -9,6 +9,7 @@ using System.Linq; namespace sparkcmd { class Program { static int Main(string[] args) { + mbts.utils.BTSNativeMethods.provide_command_line(args, args.Length); var commands = ConsoleCommandDispatcher.FindCommandsInSameAssemblyAs(typeof(Program)); return ConsoleCommandDispatcher.DispatchCommand(commands, args, Console.Out); }