conn_mgr: race connection probes and report call path with correct RTT

This commit is contained in:
evgeny committed 2026-10-01 00:42:47 +03:00
1 parent 1c51df039f
commit 111432aa64
26 files changed
+1112 -995

No files matched your search

+13
View File
@@ -161,6 +161,10 @@ CallWindow::CallWindow(QWidget* parent)
m_bgpPathLabel->setWordWrap(true);
m_bgpPathLabel->setStyleSheet("color: gray; font-size: 11px;");
m_bgpPathLabel->hide();
m_connectionLabel = new QLabel(this);
m_connectionLabel->setAlignment(Qt::AlignCenter);
m_connectionLabel->setStyleSheet("color: gray; font-size: 13px;");
setConnectionType(0, 0);
m_statsLabel = new QLabel(this);
m_statsLabel->setAlignment(Qt::AlignCenter);
m_statsLabel->setWordWrap(true);
@@ -185,6 +189,7 @@ CallWindow::CallWindow(QWidget* parent)
lay->addWidget(m_peerLabel);
lay->addWidget(m_statusLabel);
lay->addWidget(m_durationLabel);
lay->addWidget(m_connectionLabel);
lay->addWidget(m_bgpPathLabel);
lay->addWidget(m_statsLabel);
lay->addStretch(1);
@@ -231,6 +236,13 @@ void CallWindow::setBgpPath(const QString& path) {
m_bgpPathLabel->setVisible(!path.isEmpty());
}
void CallWindow::setConnectionType(uint8_t type, quint64 nextHop) {
const QString names[] = { QStringLiteral("нет подключения"), QStringLiteral("прямое"),
QStringLiteral("reverse"), QStringLiteral("indirect") };
m_connectionLabel->setText(QStringLiteral("Подключение: %1").arg(names[type <= 3 ? type : 0]));
m_connectionLabel->setToolTip(type == 3 ? QStringLiteral("Посредник: 0x%1").arg(nextHop, 16, 16, QChar('0')) : QString());
}
void CallWindow::setState(State s) {
m_state = s;
switch (s) {
@@ -256,6 +268,7 @@ void CallWindow::setState(State s) {
m_muteBtn->setChecked(false);
break;
case Ended:
setConnectionType(0, 0);
m_statusLabel->setText(QStringLiteral("Завершён"));
m_durationTimer->stop();
break;