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:
07e5c9b
)
Correctly lock mutexes when the server sends MapEditEvents (could cause memory corrup...
author
Perttu Ahola
<celeron55@gmail.com>
Wed, 28 Mar 2012 09:51:47 +0000
(12:51 +0300)
committer
Perttu Ahola
<celeron55@gmail.com>
Wed, 28 Mar 2012 09:51:47 +0000
(12:51 +0300)
src/server.cpp
patch
|
blob
|
history
diff --git
a/src/server.cpp
b/src/server.cpp
index 8c03ec88008a56c70c908d94c9b6fc9917eb2c70..6756e4a0884a92c631988375f45b11c81af6a5d5 100644
(file)
--- a/
src/server.cpp
+++ b/
src/server.cpp
@@
-1689,6
+1689,10
@@
void Server::AsyncRunStep()
Send queued-for-sending map edit events.
*/
{
+ // We will be accessing the environment and the connection
+ JMutexAutoLock lock(m_env_mutex);
+ JMutexAutoLock conlock(m_con_mutex);
+
// Don't send too many at a time
//u32 count = 0;