diff options
author | Loïc Blot <loic.blot@unix-experience.fr> | 2017-09-04 16:46:03 +0200 |
---|---|---|
committer | Loïc Blot <loic.blot@unix-experience.fr> | 2017-09-04 17:37:08 +0200 |
commit | c05228fa6d446022cdf675865f9a420c95619313 (patch) | |
tree | b4a8dfa51be6df759fad8f6f7a6e62d43623c18f /src | |
parent | 31e0f0efe93a987b7d472dbece18a3d95b00fa96 (diff) | |
download | minetest-c05228fa6d446022cdf675865f9a420c95619313.tar.gz minetest-c05228fa6d446022cdf675865f9a420c95619313.tar.bz2 minetest-c05228fa6d446022cdf675865f9a420c95619313.zip |
Re-apply previous commit with a typo fix
Diffstat (limited to 'src')
-rw-r--r-- | src/network/connection.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/network/connection.h b/src/network/connection.h index e1bb613f0..d569722bf 100644 --- a/src/network/connection.h +++ b/src/network/connection.h @@ -330,6 +330,18 @@ struct ConnectionCommand bool raw = false; ConnectionCommand() = default; + ConnectionCommand &operator=(const ConnectionCommand &other) + { + type = other.type; + address = other.address; + peer_id = other.peer_id; + channelnum = other.channelnum; + // We must copy the buffer here to prevent race condition + data = SharedBuffer<u8>(*other.data, other.data.getSize()); + reliable = other.reliable; + raw = other.raw; + return *this; + } void serve(Address address_) { |