aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2017-07-24 11:34:39 +0200
committerTobias Brunner <tobias@strongswan.org>2017-07-24 11:34:39 +0200
commit6b69a66379da3948b927de70f71fc5d0f797f5f8 (patch)
tree95ec8862a25328015aa06821c55b750abf950545
parentbf565b650c08b56e59ba911003632a3b8a38090a (diff)
downloadstrongswan-6b69a66379da3948b927de70f71fc5d0f797f5f8.tar.bz2
strongswan-6b69a66379da3948b927de70f71fc5d0f797f5f8.tar.xz
swima-collector: Fix compile error if SWID_DIRECTORY is not defined
-rw-r--r--src/libimcv/swima/swima_collector.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libimcv/swima/swima_collector.c b/src/libimcv/swima/swima_collector.c
index ab5a7b683..0fd3d14b3 100644
--- a/src/libimcv/swima/swima_collector.c
+++ b/src/libimcv/swima/swima_collector.c
@@ -29,6 +29,10 @@
#define SOURCE_ID_GENERATOR 1
#define SOURCE_ID_COLLECTOR 2
+#ifndef SWID_DIRECTORY
+#define SWID_DIRECTORY NULL
+#endif
+
#define SWID_GENERATOR "/usr/local/bin/swid_generator"
/**
@@ -386,6 +390,11 @@ static bool collect_tags(private_swima_collector_t *this, char *pathname,
enumerator_t *enumerator;
int i;
+ if (!pathname)
+ {
+ return TRUE;
+ }
+
enumerator = enumerator_create_directory(pathname);
if (!enumerator)
{
@@ -618,7 +627,7 @@ swima_collector_t *swima_collector_create(void)
{
DBG1(DBG_IMC, "database query for last event failed");
DESTROY_IF(e);
- db->destroy(db);
+ db->destroy(db);
}
else
{