projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31e0f0e
)
Re-apply previous commit with a typo fix
author
Loïc Blot
<loic.blot@unix-experience.fr>
Mon, 4 Sep 2017 14:46:03 +0000
(16:46 +0200)
committer
Loïc Blot
<loic.blot@unix-experience.fr>
Mon, 4 Sep 2017 15:37:08 +0000
(17:37 +0200)
src/network/connection.h
patch
|
blob
|
history
diff --git
a/src/network/connection.h
b/src/network/connection.h
index e1bb613f084d4c5c07cca5546f1fcc9911830db8..d569722bf68593231e5cb037a4b5ed6a20ac46d4 100644
(file)
--- 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_)
{