strongswan.org
Wiki/Project Management
Downloads
Gitweb
projects
/
strongswan.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66560f4
)
allow to have listening state TRUE while sending singal ourself
author
Martin Willi
<martin@strongswan.org>
Thu, 3 May 2007 14:22:15 +0000
(14:22 -0000)
committer
Martin Willi
<martin@strongswan.org>
Thu, 3 May 2007 14:22:15 +0000
(14:22 -0000)
src/charon/bus/bus.c
patch
|
blob
|
history
diff --git
a/src/charon/bus/bus.c
b/src/charon/bus/bus.c
index
740663d
..
dfbb899
100644
(file)
--- a/
src/charon/bus/bus.c
+++ b/
src/charon/bus/bus.c
@@
-315,6
+315,13
@@
static void vsignal(private_bus_t *this, signal_t signal, level_t level,
iterator = this->active_listeners->create_iterator(this->active_listeners, TRUE);
while (iterator->iterate(iterator, (void**)&active_listener))
{
+ /* if the thread raising the signal is the same as the one that
+ * listens, we skip it. Otherwise we have a deadlock */
+ if (active_listener->id == pthread_self())
+ {
+ continue;
+ }
+
/* wait until it is back */
while (active_listener->state == REGISTERED)
{