aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-light/src/core
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2019-02-22 18:09:48 +0100
committerMauro Sardara <msardara@cisco.com>2019-02-22 17:32:52 +0000
commitbb428fc90f2623bdf35c53e62bf2aaeba2d1e0b7 (patch)
tree2994228aff181f0e8adde36a77f0b2287d13cbc2 /hicn-light/src/core
parentfccece7f012c209f04d9f9be4a10073536091914 (diff)
[HICN-83] Added cmake flag "-DENABLE_PUNTING=[ON|OFF]" for enabling/disabling punting in hicnLightDaemon.
Change-Id: I14f5e1ce21f2c2381359fa6184671d3cbe43b808 Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'hicn-light/src/core')
-rw-r--r--hicn-light/src/core/forwarder.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hicn-light/src/core/forwarder.c b/hicn-light/src/core/forwarder.c
index 2b00a35e5..a7d151314 100644
--- a/hicn-light/src/core/forwarder.c
+++ b/hicn-light/src/core/forwarder.c
@@ -197,7 +197,7 @@ Forwarder *forwarder_Create(Logger *logger) {
dispatcher_StartSignalEvent(forwarder->dispatcher, forwarder->signal_usr1);
#endif
-#if !defined(__APPLE__) && !defined(_WIN32)
+#if !defined(__APPLE__) && !defined(_WIN32) && defined(PUNTING)
forwarder->hicnSocketHelper = hicn_create();
if (forwarder->hicnSocketHelper == NULL) return NULL;
#endif /* __APPLE__ */
@@ -237,7 +237,8 @@ void forwarder_Destroy(Forwarder **ptr) {
parcAssertNotNull(ptr, "Parameter must be non-null double pointer");
parcAssertNotNull(*ptr, "Parameter must dereference to non-null pointer");
Forwarder *forwarder = *ptr;
-#if !defined(__APPLE__) && !defined(__ANDROID__) && !defined(_WIN32)
+#if !defined(__APPLE__) && !defined(__ANDROID__) && !defined(_WIN32) && \
+ defined(PUNTING)
hicn_destroy();
#endif
parcEventTimer_Destroy(&(forwarder->keepalive_event));