summaryrefslogtreecommitdiff
path: root/omapip/isclib.c
diff options
context:
space:
mode:
authorShawn Routhier <sar@isc.org>2014-04-28 15:27:02 -0700
committerShawn Routhier <sar@isc.org>2014-04-28 15:27:02 -0700
commit158a34fb6801ff5be39d72af8b1962a96a3dc6d8 (patch)
tree284cea35675e5d88be71331875b165c414b5e820 /omapip/isclib.c
parent0da37b4ca809d7fe751dcb030ab19d8bbdce6002 (diff)
downloadisc-dhcp-158a34fb6801ff5be39d72af8b1962a96a3dc6d8.tar.gz
[master] Add #ifdefs to allow code to compile if NSUPDATE isn't defined
Diffstat (limited to 'omapip/isclib.c')
-rw-r--r--omapip/isclib.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/omapip/isclib.c b/omapip/isclib.c
index 671b321b..59332ed9 100644
--- a/omapip/isclib.c
+++ b/omapip/isclib.c
@@ -144,6 +144,15 @@ dhcp_context_create(int flags,
gettimeofday(&cur_tv, (struct timezone *)0);
isc_random_seed(cur_tv.tv_sec);
+ /* we need to create the memory context before
+ * the lib inits in case we aren't doing NSUPDATE
+ * in which case dst needs a memory context
+ */
+ result = isc_mem_create(0, 0, &dhcp_gbl_ctx.mctx);
+ if (result != ISC_R_SUCCESS)
+ goto cleanup;
+
+
#if defined (NSUPDATE)
result = dns_lib_init();
if (result != ISC_R_SUCCESS)
@@ -156,9 +165,6 @@ dhcp_context_create(int flags,
goto cleanup;
#endif
- result = isc_mem_create(0, 0, &dhcp_gbl_ctx.mctx);
- if (result != ISC_R_SUCCESS)
- goto cleanup;
result = isc_appctx_create(dhcp_gbl_ctx.mctx,
&dhcp_gbl_ctx.actx);