From 710e9e8961cf5039b425e66d2042942b7e4af0c8 Mon Sep 17 00:00:00 2001 From: Determinant Date: Fri, 28 Jun 2019 15:37:22 -0400 Subject: clean up code --- test/test_msgnet.cpp | 4 ++-- test/test_msgnet_c.c | 4 ++-- test/test_msgnet_tls.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/test_msgnet.cpp b/test/test_msgnet.cpp index 5578031..50e35dc 100644 --- a/test/test_msgnet.cpp +++ b/test/test_msgnet.cpp @@ -94,7 +94,7 @@ struct MyNet: public MsgNetworkByteOp { { if (conn->get_mode() == ConnPool::Conn::ACTIVE) { - printf("[%s] Connected, sending hello.\n", + printf("[%s] connected, sending hello.\n", this->name.c_str()); /* send the first message through this connection */ send_msg(MsgHello(this->name, "Hello there!"), @@ -106,7 +106,7 @@ struct MyNet: public MsgNetworkByteOp { } else { - printf("[%s] Disconnected, retrying.\n", this->name.c_str()); + printf("[%s] disconnected, retrying.\n", this->name.c_str()); /* try to reconnect to the same address */ connect(conn->get_addr(), false); } diff --git a/test/test_msgnet_c.c b/test/test_msgnet_c.c index 753c70f..1417d2b 100644 --- a/test/test_msgnet_c.c +++ b/test/test_msgnet_c.c @@ -170,8 +170,8 @@ void on_term_signal(int sig, void *userdata) { int main() { ec = eventcontext_new(); - netaddr_t *alice_addr = netaddr_new_from_sipport("127.0.0.1:12345"); - netaddr_t *bob_addr = netaddr_new_from_sipport("127.0.0.1:12346"); + netaddr_t *alice_addr = netaddr_new_from_sipport("127.0.0.1:12345", &err); + netaddr_t *bob_addr = netaddr_new_from_sipport("127.0.0.1:12346", &err); /* test two nodes in the same main loop */ alice = gen_mynet(ec, "Alice"); diff --git a/test/test_msgnet_tls.cpp b/test/test_msgnet_tls.cpp index b839497..a779ba5 100644 --- a/test/test_msgnet_tls.cpp +++ b/test/test_msgnet_tls.cpp @@ -105,7 +105,7 @@ struct MyNet: public MsgNetworkByteOp { res = peer_fingerprint == cert_hash; if (conn->get_mode() == ConnPool::Conn::ACTIVE) { - printf("[%s] Connected, sending hello.\n", + printf("[%s] connected, sending hello.\n", this->name.c_str()); /* send the first message through this connection */ send_msg(MsgHello(this->name, "Hello there!"), @@ -119,7 +119,7 @@ struct MyNet: public MsgNetworkByteOp { } else { - printf("[%s] Disconnected, retrying.\n", this->name.c_str()); + printf("[%s] disconnected, retrying.\n", this->name.c_str()); /* try to reconnect to the same address */ connect(conn->get_addr(), false); } -- cgit v1.2.3-70-g09d2