aboutsummaryrefslogtreecommitdiff
path: root/node/node_node.cpp
diff options
context:
space:
mode:
authorDennis Brentjes <d.brentjes@gmail.com>2017-02-26 14:31:42 +0100
committerDennis Brentjes <d.brentjes@gmail.com>2017-02-26 14:31:42 +0100
commit4c748c1022ac898ed59ebd2a1884a62ce4063b39 (patch)
treefa6e1e2436fe3243c2140cd2e0e62de2253742b3 /node/node_node.cpp
parent623dffe2c054d1639dbf9c8f21ddfb088c7950fb (diff)
downloadcmix-4c748c1022ac898ed59ebd2a1884a62ce4063b39.tar.gz
cmix-4c748c1022ac898ed59ebd2a1884a62ce4063b39.tar.bz2
cmix-4c748c1022ac898ed59ebd2a1884a62ce4063b39.zip
Enabled pointer tracing in ed25519 implementation.
Diffstat (limited to 'node/node_node.cpp')
-rw-r--r--node/node_node.cpp30
1 files changed, 24 insertions, 6 deletions
diff --git a/node/node_node.cpp b/node/node_node.cpp
index 05ca490..0bac4b3 100644
--- a/node/node_node.cpp
+++ b/node/node_node.cpp
@@ -455,16 +455,30 @@ void Node::handle_node_realpost(cmix_proto::RealPost const& realpost) {
for(auto i = 0u; i < cmix_ctx.nr_participants; i++) {
{
- std::stringstream ss;
- for(int j = 32; j < 64; j++) {
- ss << "\\" << std::setw(3) << std::setfill('0') << std::oct << (((unsigned int) msgs[i][j]) & 0xFF);
+ for(int j = 0; j < 32; j++) {
+ std::cout << std:: setw(4) << j;
}
- BOOST_LOG_TRIVIAL(trace) << ss.str();
+ std::cout << std::endl;
+
+ for(int j = 0; j < 32; j++) {
+ std::cout << std::setw(4) << (0xFF & (unsigned int) msgs[i][32+j]) ;
+ }
+ std::cout << std::endl;
}
char* message;
element_to_message(&cmix_ctx, (unsigned char**) &message, msgs[i]);
+ for(int i = 0; i < 31; i++) {
+ std::cout << std:: setw(4) << i;
+ }
+ std::cout << std::endl;
+
+ for(int i = 0; i < 31; i++) {
+ std::cout << std::setw(4) << (0xFF & (unsigned int) message[i]) ;
+ }
+ std::cout << std::endl;
+
char* dest;
size_t dest_len;
@@ -477,8 +491,12 @@ void Node::handle_node_realpost(cmix_proto::RealPost const& realpost) {
cmix_proto::Payload pay;
pay.set_payload(payload, payload_len);
- clients.at(dest_s).async_send(pay);
-
+ try {
+ clients.at(dest_s).async_send(pay);
+ } catch(...) {
+ exit(-1);
+ }
+
free(dest);
free(payload);
free(message);