summaryrefslogtreecommitdiff
path: root/omapip
diff options
context:
space:
mode:
authorShawn Routhier <sar@isc.org>2010-05-25 00:22:29 +0000
committerShawn Routhier <sar@isc.org>2010-05-25 00:22:29 +0000
commitd122accf9a2f5e7af71dd7c743720a27e10dc654 (patch)
tree84ac7f9df865f4565e6342344310fa8408d255c6 /omapip
parent8a513c436ba497094752a6013be509a9ccc3734e (diff)
downloadisc-dhcp-d122accf9a2f5e7af71dd7c743720a27e10dc654.tar.gz
Patch for 21093 - handle v4 or v6 only a little better. If we can't contstruct
the context log it and leave, if we can but then try and do a DDNS transaction using the protocol we don't have log it and continue.
Diffstat (limited to 'omapip')
-rw-r--r--omapip/isclib.c8
-rw-r--r--omapip/test.c10
2 files changed, 13 insertions, 5 deletions
diff --git a/omapip/isclib.c b/omapip/isclib.c
index f44f331b..1534dde5 100644
--- a/omapip/isclib.c
+++ b/omapip/isclib.c
@@ -1,5 +1,5 @@
/*
- * Copyright(c) 2009 by Internet Systems Consortium, Inc.("ISC")
+ * Copyright(c) 2009-2010 by Internet Systems Consortium, Inc.("ISC")
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -40,7 +40,6 @@ isclib_cleanup(void)
#endif
if (dhcp_gbl_ctx.task != NULL) {
-// isc_task_destroy(&dhcp_gbl_ctx.task);
isc_task_shutdown(dhcp_gbl_ctx.task);
isc_task_detach(&dhcp_gbl_ctx.task);
}
@@ -152,7 +151,10 @@ dhcp_context_create(void) {
return(ISC_R_SUCCESS);
cleanup:
- isclib_cleanup();
+ /*
+ * Currently we don't try and cleanup, just return an error
+ * expecting that our caller will log the error and exit.
+ */
return(result);
}
diff --git a/omapip/test.c b/omapip/test.c
index 34017e09..1171317b 100644
--- a/omapip/test.c
+++ b/omapip/test.c
@@ -3,7 +3,8 @@
Test code for omapip... */
/*
- * Copyright (c) 2004,2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1999-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
@@ -50,7 +51,12 @@ int main (int argc, char **argv)
omapi_object_t *connection = (omapi_object_t*)0;
isc_result_t status;
- dhcp_context_create();
+ status = dhcp_context_create();
+ if (status != ISC_R_SUCCESS) {
+ fprintf(stderr, "Can't initialize context: %s\n",
+ isc_result_totext(status));
+ exit(1);
+ }
omapi_init ();