MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / ShowI2CPLocalDestination

Function ShowI2CPLocalDestination

daemon/HTTPServer.cpp:690–704  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

688 }
689
690 void ShowI2CPLocalDestination (std::stringstream& s, const std::string& id)
691 {
692 auto i2cpServer = i2p::client::context.GetI2CPServer ();
693 if (i2cpServer)
694 {
695 s << "<b>I2CP " << tr("Local Destination") << ":</b><br>\r\n<br>\r\n";
696 auto it = i2cpServer->GetSessions ().find (std::stoi (id));
697 if (it != i2cpServer->GetSessions ().end ())
698 ShowLeaseSetDestination (s, it->second->GetDestination (), 0);
699 else
700 ShowError(s, tr("I2CP session not found"));
701 }
702 else
703 ShowError(s, tr("I2CP is not enabled"));
704 }
705
706 void ShowLeasesSets(std::stringstream& s)
707 {

Callers 1

HandlePageMethod · 0.85

Calls 7

trFunction · 0.85
stoiFunction · 0.85
ShowLeaseSetDestinationFunction · 0.85
ShowErrorFunction · 0.85
GetI2CPServerMethod · 0.80
GetSessionsMethod · 0.80
GetDestinationMethod · 0.45

Tested by

no test coverage detected