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,7 +74,8 @@ void FabricBridgeNode::on_add_writer(const std::string& port_id, mxlFlowWriter w
|
|||||||
void FabricBridgeNode::on_add_reader(const std::string& port_id, mxlFlowReader reader) {
|
void FabricBridgeNode::on_add_reader(const std::string& port_id, mxlFlowReader reader) {
|
||||||
if (port_id == "video_in") {
|
if (port_id == "video_in") {
|
||||||
reader_ = reader;
|
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);
|
start_requested_.store(true);
|
||||||
spdlog::info("Fabric-bridge: reader added (initiator mode), signaling startup");
|
spdlog::info("Fabric-bridge: reader added (initiator mode), signaling startup");
|
||||||
} else {
|
} else {
|
||||||
@@ -82,6 +83,7 @@ void FabricBridgeNode::on_add_reader(const std::string& port_id, mxlFlowReader r
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void FabricBridgeNode::on_remove_writer(const std::string& port_id) {
|
void FabricBridgeNode::on_remove_writer(const std::string& port_id) {
|
||||||
if (port_id == "video_out") {
|
if (port_id == "video_out") {
|
||||||
|
|||||||
Reference in New Issue
Block a user