fix(peer-client): plumb peer_id through Satellite talker paths
Satellite{Link,Client}::handleMsgPeerTalkerStart was calling
setTrunkTalkerForTG without recording peer_id, so the
trunkTalkerUpdated signal fired with peer_id="" and the new
peer/<id>/talker/<tg>/start MQTT topic became peer//talker/...
(malformed empty segment).
Use setTrunkTalkerForTGViaPeer with m_satellite_id / m_parent_id
so the topic is properly namespaced.
Also add a defensive early-return in MqttPublisher::onPeerTalker*
that logs a warning and skips the publish if peer_id is empty —
protects against future callers that emit signals without peer
attribution (e.g. TwinLink, addressed in Task 7).
This commit is contained in:
1 parent
af746d7534
commit
1bb847b3c8
3 files changed
+16
-2
No files matched your search
@@ -339,7 +339,8 @@ void SatelliteLink::handleMsgPeerTalkerStart(std::istream& is)
|
||||
// local clients. Reflector::onTrunkTalkerUpdated also forwards to
|
||||
// other satellites and trunk peers.
|
||||
m_sat_active_tgs.insert(tg);
|
||||
TGHandler::instance()->setTrunkTalkerForTG(tg, msg.callsign());
|
||||
TGHandler::instance()->setTrunkTalkerForTGViaPeer(tg, msg.callsign(),
|
||||
m_satellite_id);
|
||||
|
||||
// Forward to trunk peers
|
||||
m_reflector->forwardSatelliteAudioToTrunks(tg, msg.callsign());
|
||||
|
||||
Reference in new issue
Block a user