|
|
@ -341,10 +341,10 @@ namespace client |
|
|
|
SendReplyOK(); |
|
|
|
SendReplyOK(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void BOBCommandSession::SendData (const char * data) |
|
|
|
void BOBCommandSession::SendRaw (const char * data) |
|
|
|
{ |
|
|
|
{ |
|
|
|
std::ostream os(&m_SendBuffer); |
|
|
|
std::ostream os(&m_SendBuffer); |
|
|
|
os << "DATA " << data << std::endl; |
|
|
|
os << data << std::endl; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void BOBCommandSession::BuildStatusLine(bool currentTunnel, BOBDestination *dest, std::string &out) |
|
|
|
void BOBCommandSession::BuildStatusLine(bool currentTunnel, BOBDestination *dest, std::string &out) |
|
|
@ -370,7 +370,8 @@ namespace client |
|
|
|
|
|
|
|
|
|
|
|
// build line
|
|
|
|
// build line
|
|
|
|
std::stringstream ss; |
|
|
|
std::stringstream ss; |
|
|
|
ss << "NICKNAME: " << nickname << " " << "STARTING: " << bool_str(starting) << " " |
|
|
|
ss << "DATA " |
|
|
|
|
|
|
|
<< "NICKNAME: " << nickname << " " << "STARTING: " << bool_str(starting) << " " |
|
|
|
<< "RUNNING: " << bool_str(running) << " " << "STOPPING: " << bool_str(stopping) << " " |
|
|
|
<< "RUNNING: " << bool_str(running) << " " << "STOPPING: " << bool_str(stopping) << " " |
|
|
|
<< "KEYS: " << bool_str(keys) << " " << "QUIET: " << bool_str(quiet) << " " |
|
|
|
<< "KEYS: " << bool_str(keys) << " " << "QUIET: " << bool_str(quiet) << " " |
|
|
|
<< "INPORT: " << inport << " " << "INHOST: " << inhost << " " |
|
|
|
<< "INPORT: " << inport << " " << "INHOST: " << inhost << " " |
|
|
@ -654,7 +655,7 @@ namespace client |
|
|
|
for (const auto& it: destinations) |
|
|
|
for (const auto& it: destinations) |
|
|
|
{ |
|
|
|
{ |
|
|
|
BuildStatusLine(false, it.second, statusLine); |
|
|
|
BuildStatusLine(false, it.second, statusLine); |
|
|
|
SendData (statusLine.c_str()); |
|
|
|
SendRaw(statusLine.c_str()); |
|
|
|
if(m_Nickname.compare(it.second->GetNickname()) == 0) |
|
|
|
if(m_Nickname.compare(it.second->GetNickname()) == 0) |
|
|
|
sentCurrent = true; |
|
|
|
sentCurrent = true; |
|
|
|
} |
|
|
|
} |
|
|
@ -663,7 +664,7 @@ namespace client |
|
|
|
// add the current tunnel to the list
|
|
|
|
// add the current tunnel to the list
|
|
|
|
BuildStatusLine(true, m_CurrentDestination, statusLine); |
|
|
|
BuildStatusLine(true, m_CurrentDestination, statusLine); |
|
|
|
LogPrint(eLogError, statusLine); |
|
|
|
LogPrint(eLogError, statusLine); |
|
|
|
SendData(statusLine.c_str()); |
|
|
|
SendRaw(statusLine.c_str()); |
|
|
|
} |
|
|
|
} |
|
|
|
SendReplyOK ("Listing done"); |
|
|
|
SendReplyOK ("Listing done"); |
|
|
|
} |
|
|
|
} |
|
|
|