X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=src%2Fcommand_client.cpp;fp=src%2Fcommand_client.cpp;h=a603634226a72cd3d2cc33408c5d4ee00eba34d4;hp=0d387b9e0029faa8d93ded8be30fcc7b37e2486b;hb=d535333ffe637c9e547e68b792f334c229641520;hpb=a7170401dd90dc79cc7d7a808cfe18a06c7e983b diff --git a/src/command_client.cpp b/src/command_client.cpp index 0d387b9..a603634 100644 --- a/src/command_client.cpp +++ b/src/command_client.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include "command_client.hxx" @@ -43,6 +42,14 @@ void command_client::send_command(command* cmd, result_container &res) // TODO: exceptions oa << cc; + std::ostream* ostr; + if ((ostr=c.get_logstream(fulldebug))!=NULL) + { + (*ostr) << "sending command, decoded data: " << std::endl; + boost::archive::xml_oarchive xo(*ostr); + xo << BOOST_SERIALIZATION_NVP(cc); + } + c.write(ofs.str()); // TODO: fix timeout @@ -55,6 +62,13 @@ void command_client::send_command(command* cmd, result_container &res) // TODO: exceptions ia >> res; + + if ((ostr=c.get_logstream(fulldebug))!=NULL) + { + (*ostr) << "received result, decoded data: " << std::endl; + boost::archive::xml_oarchive xo(*ostr); + xo << BOOST_SERIALIZATION_NVP(res); + } } }