Fixed link stats in object details

This commit is contained in:
Mark Qvist 2025-05-15 15:58:21 +02:00
parent 137c0b284e
commit 5355f0e91f

View file

@ -1896,12 +1896,12 @@ class SidebandCore():
mr = self.message_router mr = self.message_router
oh = destination_hash oh = destination_hash
ol = None ol = None
if oh in mr.direct_links: if oh in mr.direct_links and mr.direct_links[oh].status == RNS.Link.ACTIVE:
ol = mr.direct_links[oh] ol = mr.direct_links[oh]
elif oh in mr.backchannel_links: elif oh in mr.backchannel_links:
ol = mr.backchannel_links[oh] ol = mr.backchannel_links[oh]
if ol != None: if ol != None and ol.status == RNS.Link.ACTIVE:
ler = ol.get_establishment_rate() ler = ol.get_establishment_rate()
if ler: if ler:
return ler return ler
@ -1931,12 +1931,12 @@ class SidebandCore():
mr = self.message_router mr = self.message_router
oh = destination_hash oh = destination_hash
ol = None ol = None
if oh in mr.direct_links: if oh in mr.direct_links and mr.direct_links[oh].status == RNS.Link.ACTIVE:
ol = mr.direct_links[oh] ol = mr.direct_links[oh]
elif oh in mr.backchannel_links: elif oh in mr.backchannel_links:
ol = mr.backchannel_links[oh] ol = mr.backchannel_links[oh]
if ol != None: if ol != None and ol.status == RNS.Link.ACTIVE:
return ol.get_mtu() return ol.get_mtu()
return None return None
@ -1964,12 +1964,12 @@ class SidebandCore():
mr = self.message_router mr = self.message_router
oh = destination_hash oh = destination_hash
ol = None ol = None
if oh in mr.direct_links: if oh in mr.direct_links and mr.direct_links[oh].status == RNS.Link.ACTIVE:
ol = mr.direct_links[oh] ol = mr.direct_links[oh]
elif oh in mr.backchannel_links: elif oh in mr.backchannel_links:
ol = mr.backchannel_links[oh] ol = mr.backchannel_links[oh]
if ol != None: if ol != None and ol.status == RNS.Link.ACTIVE:
return ol.get_expected_rate() return ol.get_expected_rate()
return None return None
@ -1997,12 +1997,12 @@ class SidebandCore():
mr = self.message_router mr = self.message_router
oh = destination_hash oh = destination_hash
ol = None ol = None
if oh in mr.direct_links: if oh in mr.direct_links and mr.direct_links[oh].status == RNS.Link.ACTIVE:
ol = mr.direct_links[oh] ol = mr.direct_links[oh]
elif oh in mr.backchannel_links: elif oh in mr.backchannel_links:
ol = mr.backchannel_links[oh] ol = mr.backchannel_links[oh]
if ol != None: return ol.get_mode() if ol != None and ol.status == RNS.Link.ACTIVE: return ol.get_mode()
return None return None
@ -2072,6 +2072,8 @@ class SidebandCore():
connection.send(self._get_destination_mtu(call["get_destination_mtu"])) connection.send(self._get_destination_mtu(call["get_destination_mtu"]))
elif "get_destination_edr" in call: elif "get_destination_edr" in call:
connection.send(self._get_destination_edr(call["get_destination_edr"])) connection.send(self._get_destination_edr(call["get_destination_edr"]))
elif "get_destination_lmd" in call:
connection.send(self._get_destination_lmd(call["get_destination_lmd"]))
elif "send_message" in call: elif "send_message" in call:
args = call["send_message"] args = call["send_message"]
send_result = self.send_message( send_result = self.send_message(