diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-09-27 19:47:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-27 19:47:36 +0200 |
commit | ad7daf7b52348e1b71aa803be10de5b2134cba11 (patch) | |
tree | e5a528d0e9be11f678d113dde3ec4b49f3d96c26 /src/unittest | |
parent | 50b2185ced9dc64e054ce743bbc22d15ecdf6192 (diff) | |
download | minetest-ad7daf7b52348e1b71aa803be10de5b2134cba11.tar.gz minetest-ad7daf7b52348e1b71aa803be10de5b2134cba11.tar.bz2 minetest-ad7daf7b52348e1b71aa803be10de5b2134cba11.zip |
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
Diffstat (limited to 'src/unittest')
-rw-r--r-- | src/unittest/test_connection.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<u8> 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<u8> 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(); |