mirror of
https://github.com/nasa/trick.git
synced 2025-01-29 15:43:57 +00:00
Fix output going to the wrong stream. ref #678
This commit is contained in:
parent
7ef86c92c0
commit
531a94173e
@ -21,7 +21,7 @@ Trick::VariableServer::~VariableServer() {
|
||||
std::ostream& Trick::operator<< (std::ostream& s, Trick::VariableServer& vs) {
|
||||
std::map < pthread_t , VariableServerThread * >::iterator it ;
|
||||
|
||||
std::cout << "{\"variable-server-connections\":[" << std::endl;
|
||||
s << "{\"variable_server_connections\":[" << std::endl;
|
||||
int count = 0;
|
||||
int n_connections = (int)vs.var_server_threads.size();
|
||||
for ( it = vs.var_server_threads.begin() ; it != vs.var_server_threads.end() ; it++ ) {
|
||||
@ -29,7 +29,7 @@ std::ostream& Trick::operator<< (std::ostream& s, Trick::VariableServer& vs) {
|
||||
s << *(*it).second;
|
||||
s << "}";
|
||||
if ((n_connections-count)>1) {
|
||||
std::cout << "," ;
|
||||
s << "," ;
|
||||
}
|
||||
s << std::endl;
|
||||
count ++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user