summaryrefslogtreecommitdiff
path: root/src/libcharon/plugins/vici/vici_dispatcher.c
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@corsac.net>2017-04-01 16:26:44 +0200
committerYves-Alexis Perez <corsac@corsac.net>2017-04-01 16:26:44 +0200
commitdc9380af81fbce8e1a9532b07bc671b9d346101b (patch)
tree219f7df0b01243ac1c41c7f679d1b4c6aef36b27 /src/libcharon/plugins/vici/vici_dispatcher.c
parent212c0ba74c0e453497b840f9cd131ec99f73754a (diff)
parent05ddd767992d68bb38c7f16ece142e8c2e9ae016 (diff)
downloadvyos-strongswan-dc9380af81fbce8e1a9532b07bc671b9d346101b.tar.gz
vyos-strongswan-dc9380af81fbce8e1a9532b07bc671b9d346101b.zip
Merge tag 'upstream/5.5.2'
Upstream version 5.5.2
Diffstat (limited to 'src/libcharon/plugins/vici/vici_dispatcher.c')
-rw-r--r--src/libcharon/plugins/vici/vici_dispatcher.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libcharon/plugins/vici/vici_dispatcher.c b/src/libcharon/plugins/vici/vici_dispatcher.c
index ffe0d61e5..596255b91 100644
--- a/src/libcharon/plugins/vici/vici_dispatcher.c
+++ b/src/libcharon/plugins/vici/vici_dispatcher.c
@@ -471,15 +471,17 @@ METHOD(vici_dispatcher_t, manage_event, void,
METHOD(vici_dispatcher_t, has_event_listeners, bool,
private_vici_dispatcher_t *this, char *name)
{
+ event_t *event;
bool retval = FALSE;
this->mutex->lock(this->mutex);
- if (this->events->get(this->events, name))
+ event = this->events->get(this->events, name);
+ if (event)
{
/* the entry might be getting destroyed, but returning
* false positive is not a problem as a later raise_event
* will check things again. */
- retval = TRUE;
+ retval = array_count(event->clients);
}
this->mutex->unlock(this->mutex);