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

Method StopCommandHandler

libi2pd_client/BOB.cpp:543–565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

541 }
542
543 void BOBCommandSession::StopCommandHandler (const char * operand, size_t len)
544 {
545 LogPrint (eLogDebug, "BOB: stop ", m_Nickname);
546 if (!m_IsActive)
547 {
548 SendReplyError ("tunnel is inactive");
549 return;
550 }
551 auto dest = m_Owner.FindDestination (m_Nickname);
552 auto proxy = m_Owner.GetProxy (m_Nickname);
553 if (dest)
554 {
555 dest->StopTunnels ();
556 SendReplyOK ("Tunnel stopping");
557 if (proxy)
558 {
559 m_Owner.RemoveProxy (m_Nickname);
560 }
561 }
562 else
563 SendReplyError ("tunnel not found");
564 m_IsActive = false;
565 }
566
567 void BOBCommandSession::SetNickCommandHandler (const char * operand, size_t len)
568 {

Callers

nothing calls this directly

Calls 5

LogPrintFunction · 0.85
FindDestinationMethod · 0.80
GetProxyMethod · 0.80
StopTunnelsMethod · 0.80
RemoveProxyMethod · 0.80

Tested by

no test coverage detected