fix: Pass BlitUserSymbol by val to cpp

This is a csharp/cpp interop method. The csharp delegate, which is passed
to and eventually invoked from cpp, accepts this param by value already,
but for some reason the corresponding cpp delegate accepts that same
param by ref. While working to enable the api server build on Linux, I
discovered this delegate was receiving bogus data from cpp. The problem
went away when I changed the cpp delegate param to be passed by value,
rather than ref.
This commit is contained in:
John Colvin committed 2023-03-20 13:26:43 -04:00
1 parent 41447067a2
commit a07fa26bfe
1 file changed
+2 -2
+2 -2
View File
@@ -167,7 +167,7 @@ CAPI int md_consumer_read_rfqs(
//
// Relay control
CAPI void add_relay_symbol(
md::RelayControl *prelay, BlitUserSymbol &symbol, uint32_t flags) {
md::RelayControl *prelay, BlitUserSymbol symbol, uint32_t flags) {
co2::SecurityChannel channel;
channel.set_symbol(symbol.symbol);
channel.set_exchange(symbol.exchange);
@@ -190,7 +190,7 @@ CAPI void set_relay_token(
md::set_relay_token(prelay, std::string(token, token_size));
}
typedef void (*usersymbol_cb)(BlitUserSymbol &symbol);
typedef void (*usersymbol_cb)(BlitUserSymbol symbol);
CAPI void md_consumer_get_system_md_symbols(usersymbol_cb cb) {
std::set<UserSymbol> system_symbols;
get_system_md_symbols(