From ad7daf7b52348e1b71aa803be10de5b2134cba11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Wed, 27 Sep 2017 19:47:36 +0200 Subject: Add session_t typedef + remove unused functions (#6470) * Add session_t typedef + remove unused functions u16 peer_id is used everywhere, to be more consistent and permit some evolutions on this type in the future (i'm working on a PoC), uniformize u16 peer_id to SessionId peer_id --- src/unittest/test_connection.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/unittest') diff --git a/src/unittest/test_connection.cpp b/src/unittest/test_connection.cpp index 59535fbfd..8217c403e 100644 --- a/src/unittest/test_connection.cpp +++ b/src/unittest/test_connection.cpp @@ -81,7 +81,7 @@ void TestConnection::testHelpers() { // Some constants for testing u32 proto_id = 0x12345678; - u16 peer_id = 123; + session_t peer_id = 123; u8 channel = 2; SharedBuffer data1(1); data1[0] = 100; @@ -94,7 +94,7 @@ void TestConnection::testHelpers() We should now have a packet with this data: Header: [0] u32 protocol_id - [4] u16 sender_peer_id + [4] session_t sender_peer_id [6] u8 channel Data: [7] u8 data1[0] @@ -264,7 +264,7 @@ void TestConnection::testConnectSendReceive() UASSERT(memcmp(*sentdata, *recvdata, recvdata.getSize()) == 0); } - u16 peer_id_client = 2; + session_t peer_id_client = 2; /* Send a large packet */ @@ -296,7 +296,7 @@ void TestConnection::testConnectSendReceive() SharedBuffer recvdata; infostream << "** running client.Receive()" << std::endl; - u16 peer_id = 132; + session_t peer_id = 132; u16 size = 0; bool received = false; u64 timems0 = porting::getTimeMs(); -- cgit v1.2.3