diff --git a/src/ui.cpp b/src/ui.cpp index 3058a81..22331f5 100644 --- a/src/ui.cpp +++ b/src/ui.cpp @@ -266,6 +266,11 @@ struct App { /// CONFIG arrived. std::string source_host; std::uint16_t source_port = 0; + /// How that source was reached. Unused at runtime -- `Acquisition` has its own copy -- but + /// written into the session file, because `_.toml` can say neither, and the startup + /// chooser needs both to reconnect to a multicast source from a stored row. + std::string source_multicast; + std::string source_interface; guint layout_save_source = 0; bool layout_loaded = false; unsigned signal_generation = ~0u; @@ -558,6 +563,9 @@ LayoutState collect_layout(App& app) { // The app's own lists are the pane's source of truth for both of these. st.math = app.math; st.measures = app.measures; + // The connection is the session's too: the file's name carries only host and port. + st.multicast = app.source_multicast; + st.interface_addr = app.source_interface; return st; } @@ -7159,6 +7167,8 @@ int run_ui(int argc, char** argv, const Config& cfg, ScopeModel& model, Acquisit // Which data source this session talks to: the persisted-layout file's name. app.source_host = cfg.server; app.source_port = cfg.port; + app.source_multicast = cfg.multicast; + app.source_interface = cfg.interface_addr; GtkApplication* application = // `NON_UNIQUE`: a scope is the kind of program a user runs twice side by side -- one