summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2015-02-21 12:27:05 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2015-02-21 12:30:14 +0100
commitab006391305165c805f75e3a2ce20946748233c9 (patch)
tree53f52f543c901d812619ed162edb71a9e01bf6ed
parentdfc7a6c6a0758a1d9a13b94708228c9844efe97e (diff)
Fixes a bug in locking code.
When multiple protocols have a lock for the same IP address, it crashes under some circumstances. Thanks to Matthias Schiffer for the bugreport.
-rw-r--r--nest/locks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nest/locks.c b/nest/locks.c
index c74f2f45..ad2af493 100644
--- a/nest/locks.c
+++ b/nest/locks.c
@@ -70,7 +70,7 @@ olock_free(resource *r)
DBG("olock: -> %p becomes locked\n", n);
q = SKIP_BACK(struct object_lock, n, n);
rem_node(n);
- add_tail_list(&l->waiters, &q->waiters);
+ add_tail_list(&q->waiters, &l->waiters);
q->state = OLOCK_STATE_EVENT;
add_head(&olock_list, n);
ev_schedule(olock_event);