From f99d8b10c9f5b5024b4b1e5f5d1e56e2519cdadc Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Wed, 2 May 2012 09:03:23 +0200 Subject: Added a dedicated sender flush method, delay sender destruction until users gone --- src/libcharon/daemon.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/libcharon/daemon.c') diff --git a/src/libcharon/daemon.c b/src/libcharon/daemon.c index 3fb49d475..f2c054a12 100644 --- a/src/libcharon/daemon.c +++ b/src/libcharon/daemon.c @@ -109,8 +109,11 @@ static void destroy(private_daemon_t *this) { this->public.traps->flush(this->public.traps); } + if (this->public.sender) + { + this->public.sender->flush(this->public.sender); + } DESTROY_IF(this->public.receiver); - DESTROY_IF(this->public.sender); #ifdef ME DESTROY_IF(this->public.connect_manager); DESTROY_IF(this->public.mediation_manager); @@ -129,6 +132,7 @@ static void destroy(private_daemon_t *this) DESTROY_IF(this->public.controller); DESTROY_IF(this->public.eap); DESTROY_IF(this->public.backends); + DESTROY_IF(this->public.sender); DESTROY_IF(this->public.socket); /* rehook library logging, shutdown logging */ -- cgit v1.2.3