summaryrefslogtreecommitdiff
path: root/omapip/auth.c
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>2001-06-27 00:31:20 +0000
committerTed Lemon <source@isc.org>2001-06-27 00:31:20 +0000
commitd758ad8cac9c00c70cfe4dd459bf7e87c268c579 (patch)
tree85d7e10e40b0e1061a40f45ef0e9f44073346482 /omapip/auth.c
parent07b958004f4e39f9b222115b1b050044a2434ea1 (diff)
downloadisc-dhcp-d758ad8cac9c00c70cfe4dd459bf7e87c268c579.tar.gz
Merge changes between 3.0rc7 and 3.0rc8pl2.
Diffstat (limited to 'omapip/auth.c')
-rw-r--r--omapip/auth.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/omapip/auth.c b/omapip/auth.c
index 2c6ba86d..1ad4150f 100644
--- a/omapip/auth.c
+++ b/omapip/auth.c
@@ -43,20 +43,20 @@
#ifndef lint
static char ocopyright[] =
-"$Id: auth.c,v 1.3 2001/05/02 17:00:32 mellon Exp $ Copyright 1998-2000 The Internet Software Consortium.";
+"$Id: auth.c,v 1.4 2001/06/27 00:30:42 mellon Exp $ Copyright 1998-2000 The Internet Software Consortium.";
#endif
#include <omapip/omapip_p.h>
OMAPI_OBJECT_ALLOC (omapi_auth_key, omapi_auth_key_t, omapi_type_auth_key)
-static struct hash_table *auth_key_hash = (struct hash_table *)0;
+struct hash_table *auth_key_hash = (struct hash_table *)0;
HASH_FUNCTIONS_DECL (omapi_auth_key, const char *, omapi_auth_key_t)
isc_result_t omapi_auth_key_new (omapi_auth_key_t **o, const char *file,
int line)
{
- return omapi_auth_key_allocate (o, MDL);
+ return omapi_auth_key_allocate (o, file, line);
}
isc_result_t omapi_auth_key_destroy (omapi_object_t *h,
@@ -105,7 +105,7 @@ isc_result_t omapi_auth_key_enter (omapi_auth_key_t *a)
auth_key_hash =
new_hash ((hash_reference)omapi_auth_key_reference,
(hash_dereference)omapi_auth_key_dereference,
- 1);
+ 1, MDL);
if (!auth_key_hash)
return ISC_R_NOMEMORY;
}
@@ -135,6 +135,9 @@ isc_result_t omapi_auth_key_lookup (omapi_object_t **h,
if (!auth_key_hash)
return ISC_R_NOTFOUND;
+ if (!ref)
+ return ISC_R_NOKEYS;
+
status = omapi_get_value_str (ref, id, "name", &name);
if (status != ISC_R_SUCCESS)
return status;