summaryrefslogtreecommitdiffstats
path: root/src/network/room_member.cpp
diff options
context:
space:
mode:
authorB3n30 <benediktthomas@gmail.com>2017-07-15 11:39:27 +0200
committerB3n30 <benediktthomas@gmail.com>2017-07-16 21:30:10 +0200
commit253d3dd3d889eb61131810b04137ee3f9445db64 (patch)
tree5ff2298ff663de6761425daa1d6943275ee914ea /src/network/room_member.cpp
parentNetwork: Made send async in RoomMember (diff)
downloadyuzu-253d3dd3d889eb61131810b04137ee3f9445db64.tar
yuzu-253d3dd3d889eb61131810b04137ee3f9445db64.tar.gz
yuzu-253d3dd3d889eb61131810b04137ee3f9445db64.tar.bz2
yuzu-253d3dd3d889eb61131810b04137ee3f9445db64.tar.lz
yuzu-253d3dd3d889eb61131810b04137ee3f9445db64.tar.xz
yuzu-253d3dd3d889eb61131810b04137ee3f9445db64.tar.zst
yuzu-253d3dd3d889eb61131810b04137ee3f9445db64.zip
Diffstat (limited to 'src/network/room_member.cpp')
-rw-r--r--src/network/room_member.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/network/room_member.cpp b/src/network/room_member.cpp
index f6f8b0475..8fd226ba5 100644
--- a/src/network/room_member.cpp
+++ b/src/network/room_member.cpp
@@ -127,6 +127,9 @@ void RoomMember::RoomMemberImpl::MemberLoop() {
case IdVersionMismatch:
SetState(State::WrongVersion);
break;
+ case IdCloseRoom:
+ SetState(State::LostConnection);
+ break;
default:
break;
}
@@ -307,7 +310,7 @@ RoomInformation RoomMember::GetRoomInformation() const {
}
void RoomMember::Join(const std::string& nick, const char* server_addr, u16 server_port,
- u16 client_port) {
+ u16 client_port, const MacAddress& preferred_mac) {
// If the member is connected, kill the connection first
if (room_member_impl->loop_thread && room_member_impl->loop_thread->joinable()) {
room_member_impl->SetState(State::Error);
@@ -336,7 +339,7 @@ void RoomMember::Join(const std::string& nick, const char* server_addr, u16 serv
room_member_impl->nickname = nick;
room_member_impl->SetState(State::Joining);
room_member_impl->StartLoop();
- room_member_impl->SendJoinRequest(nick);
+ room_member_impl->SendJoinRequest(nick, preferred_mac);
} else {
room_member_impl->SetState(State::CouldNotConnect);
}