fix: trigger startup on add_reader when target_host is set
The initiator couldn't start because start_requested_ was never set when target_host was provided without target_info. Now on_add_reader signals startup when either target_info_str_ or target_host_ is available.
This commit is contained in:
@@ -74,13 +74,15 @@ void FabricBridgeNode::on_add_writer(const std::string& port_id, mxlFlowWriter w
|
||||
void FabricBridgeNode::on_add_reader(const std::string& port_id, mxlFlowReader reader) {
|
||||
if (port_id == "video_in") {
|
||||
reader_ = reader;
|
||||
if (mode_ == FabricMode::Initiator && !target_info_str_.empty()) {
|
||||
if (mode_ == FabricMode::Initiator) {
|
||||
if (!target_info_str_.empty() || !target_host_.empty()) {
|
||||
start_requested_.store(true);
|
||||
spdlog::info("Fabric-bridge: reader added (initiator mode), signaling startup");
|
||||
} else {
|
||||
spdlog::info("Fabric-bridge: reader added (initiator mode), waiting for target_info");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FabricBridgeNode::on_remove_writer(const std::string& port_id) {
|
||||
|
||||
Reference in New Issue
Block a user