From 28cf450bfa9c29b163deb8963ac2af5483d0a043 Mon Sep 17 00:00:00 2001 From: orignal Date: Sat, 28 Jan 2017 09:18:30 -0500 Subject: [PATCH] show status of shared local destination --- I2PControl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/I2PControl.cpp b/I2PControl.cpp index 23503906..4adc6e07 100644 --- a/I2PControl.cpp +++ b/I2PControl.cpp @@ -25,6 +25,7 @@ #include "Transports.h" #include "version.h" #include "util.h" +#include "ClientContext.h" #include "I2PControl.h" namespace i2p @@ -401,7 +402,8 @@ namespace client void I2PControlService::StatusHandler (std::ostringstream& results) { - InsertParam (results, "i2p.router.status", i2p::transport::transports.IsOnline () ? "1" : "0"); + auto dest = i2p::client::context.GetSharedLocalDestination (); + InsertParam (results, "i2p.router.status", (dest && dest->IsReady ()) ? "1" : "0"); } void I2PControlService::NetDbKnownPeersHandler (std::ostringstream& results)