aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2008-08-28 16:27:48 +0000
committerMartin Willi <martin@strongswan.org>2008-08-28 16:27:48 +0000
commite609b1cda2197ffaba506de1ef93076a5f0372ae (patch)
treecf3e06431ec534f8f7d7d01c3d524fa1806a500a /src/libstrongswan
parentdc98e5015355c648d253f287e093dc6b34e0d7b3 (diff)
downloadstrongswan-e609b1cda2197ffaba506de1ef93076a5f0372ae.tar.bz2
strongswan-e609b1cda2197ffaba506de1ef93076a5f0372ae.tar.xz
capability API to allow plugin-controlled capability set
Diffstat (limited to 'src/libstrongswan')
-rw-r--r--src/libstrongswan/library.c2
-rw-r--r--src/libstrongswan/library.h5
-rw-r--r--src/libstrongswan/utils/leak_detective.c1
3 files changed, 8 insertions, 0 deletions
diff --git a/src/libstrongswan/library.c b/src/libstrongswan/library.c
index fe7498f1a..6b9043b1a 100644
--- a/src/libstrongswan/library.c
+++ b/src/libstrongswan/library.c
@@ -86,6 +86,8 @@ void library_init(char *settings)
private_library_t *this = malloc_thing(private_library_t);
lib = &this->public;
+ lib->leak_detective = FALSE;
+
#ifdef LEAK_DETECTIVE
this->detective = leak_detective_create();
#endif /* LEAK_DETECTIVE */
diff --git a/src/libstrongswan/library.h b/src/libstrongswan/library.h
index 9d151c4cc..2ea4b624b 100644
--- a/src/libstrongswan/library.h
+++ b/src/libstrongswan/library.h
@@ -108,6 +108,11 @@ struct library_t {
* various settings loaded from settings file
*/
settings_t *settings;
+
+ /**
+ * is leak detective running?
+ */
+ bool leak_detective;
};
/**
diff --git a/src/libstrongswan/utils/leak_detective.c b/src/libstrongswan/utils/leak_detective.c
index 72da4bd37..70726da3b 100644
--- a/src/libstrongswan/utils/leak_detective.c
+++ b/src/libstrongswan/utils/leak_detective.c
@@ -560,6 +560,7 @@ leak_detective_t *leak_detective_create()
if (getenv("LEAK_DETECTIVE_DISABLE") == NULL)
{
+ lib->leak_detective = TRUE;
install_hooks();
}
return &this->public;