call Run peer test from menu
Some checks are pending
Build Debian packages / bookworm (push) Waiting to run
Build Debian packages / bullseye (push) Waiting to run
Build Debian packages / trixie (push) Waiting to run
Build on FreeBSD / with UPnP (push) Waiting to run
Build on OSX / With USE_UPNP=no (push) Waiting to run
Build on OSX / With USE_UPNP=yes (push) Waiting to run
Build on Windows / clang-x86_64 (push) Waiting to run
Build on Windows / i686 (push) Waiting to run
Build on Windows / ucrt-x86_64 (push) Waiting to run
Build on Windows / x86_64 (push) Waiting to run
Build on Windows / CMake clang-x86_64 (push) Waiting to run
Build on Windows / CMake i686 (push) Waiting to run
Build on Windows / CMake ucrt-x86_64 (push) Waiting to run
Build on Windows / CMake x86_64 (push) Waiting to run
Build on Windows / XP (push) Waiting to run
Build on Ubuntu / Make with USE_UPNP=no (push) Waiting to run
Build on Ubuntu / Make with USE_UPNP=yes (push) Waiting to run
Build on Ubuntu / CMake with -DWITH_UPNP=OFF (push) Waiting to run
Build on Ubuntu / CMake with -DWITH_UPNP=ON (push) Waiting to run
Build containers / Building container for linux/amd64 (push) Waiting to run
Build containers / Building container for linux/arm64 (push) Waiting to run
Build containers / Building container for linux/arm/v7 (push) Waiting to run
Build containers / Building container for linux/386 (push) Waiting to run
Build containers / Pushing merged manifest (push) Blocked by required conditions

This commit is contained in:
orignal 2025-09-24 20:45:47 -04:00
parent c34e3f35c0
commit acb09c3119

View file

@ -24,11 +24,13 @@
#include "Config.h" #include "Config.h"
#include "RouterContext.h" #include "RouterContext.h"
#include "Tunnel.h" #include "Tunnel.h"
#include "Transports.h"
#include "Daemon.h" #include "Daemon.h"
constexpr int M_GRACEFUL_SHUTDOWN = 1; constexpr int M_GRACEFUL_SHUTDOWN = 1;
constexpr int C_GRACEFUL_SHUTDOWN_UPDATE = 2; constexpr int C_GRACEFUL_SHUTDOWN_UPDATE = 2;
constexpr int C_MAIN_VIEW_UPDATE = 3; constexpr int C_MAIN_VIEW_UPDATE = 3;
constexpr int M_RUN_PEER_TEST = 4;
constexpr bigtime_t GRACEFUL_SHUTDOWN_UPDATE_INTERVAL = 1000*1100; // in microseconds, ~ 1 sec constexpr bigtime_t GRACEFUL_SHUTDOWN_UPDATE_INTERVAL = 1000*1100; // in microseconds, ~ 1 sec
constexpr int GRACEFUL_SHUTDOWN_UPDATE_COUNT = 600; // 10 minutes constexpr int GRACEFUL_SHUTDOWN_UPDATE_COUNT = 600; // 10 minutes
constexpr bigtime_t MAIN_VIEW_UPDATE_INTERVAL = 5000*1000; // in miscroseconds, 5 secs constexpr bigtime_t MAIN_VIEW_UPDATE_INTERVAL = 5000*1000; // in miscroseconds, 5 secs
@ -66,6 +68,9 @@ MainWindow::MainWindow ():
runMenu->AddItem (new BMenuItem ("Graceful shutdown", new BMessage (M_GRACEFUL_SHUTDOWN), 'G')); runMenu->AddItem (new BMenuItem ("Graceful shutdown", new BMessage (M_GRACEFUL_SHUTDOWN), 'G'));
runMenu->AddItem (new BMenuItem ("Quit", new BMessage (B_QUIT_REQUESTED), 'Q')); runMenu->AddItem (new BMenuItem ("Quit", new BMessage (B_QUIT_REQUESTED), 'Q'));
menuBar->AddItem (runMenu); menuBar->AddItem (runMenu);
auto commandsMenu = new BMenu ("Commands");
commandsMenu->AddItem (new BMenuItem ("Run peer test", new BMessage (M_RUN_PEER_TEST), 'P'));
menuBar->AddItem (commandsMenu);
m_MainView = new BStringView (BRect (20, 21, 300, 250), nullptr, "Starting...", B_FOLLOW_ALL, B_WILL_DRAW); m_MainView = new BStringView (BRect (20, 21, 300, 250), nullptr, "Starting...", B_FOLLOW_ALL, B_WILL_DRAW);
m_MainView->SetViewColor (255, 255, 255); m_MainView->SetViewColor (255, 255, 255);
m_MainView->SetHighColor (0xD4, 0x3B, 0x69); m_MainView->SetHighColor (0xD4, 0x3B, 0x69);
@ -91,7 +96,7 @@ void MainWindow::MessageReceived (BMessage * msg)
{ {
case C_MAIN_VIEW_UPDATE: case C_MAIN_VIEW_UPDATE:
UpdateMainView (); UpdateMainView ();
break; break;
case M_GRACEFUL_SHUTDOWN: case M_GRACEFUL_SHUTDOWN:
if (!m_GracefulShutdownTimer) if (!m_GracefulShutdownTimer)
{ {
@ -120,6 +125,9 @@ void MainWindow::MessageReceived (BMessage * msg)
m_GracefulShutdownTimer = nullptr; m_GracefulShutdownTimer = nullptr;
BWindow::MessageReceived (msg); BWindow::MessageReceived (msg);
break; break;
case M_RUN_PEER_TEST:
i2p::transport::transports.PeerTest ();
break;
default: default:
BWindow::MessageReceived (msg); BWindow::MessageReceived (msg);
} }