aboutsummaryrefslogtreecommitdiff
path: root/omapip
diff options
context:
space:
mode:
Diffstat (limited to 'omapip')
-rw-r--r--omapip/handle.c4
-rw-r--r--omapip/listener.c9
-rw-r--r--omapip/protocol.c13
3 files changed, 14 insertions, 12 deletions
diff --git a/omapip/handle.c b/omapip/handle.c
index b69ef12..8405acf 100644
--- a/omapip/handle.c
+++ b/omapip/handle.c
@@ -3,7 +3,7 @@
Functions for maintaining handles on objects. */
/*
- * Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2009-2010,2012 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 2004-2007 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1999-2003 by Internet Software Consortium
*
@@ -252,7 +252,6 @@ static isc_result_t omapi_handle_lookup_in (omapi_object_t **o,
omapi_handle_table_t *table,
int op)
{
- omapi_handle_table_t *inner;
omapi_handle_t scale, index;
if (!table || table->first > h || table->limit <= h)
@@ -282,7 +281,6 @@ static isc_result_t omapi_handle_lookup_in (omapi_object_t **o,
handle must be the subtable of this table whose index into this
table's array of children is the handle divided by the scale. */
index = (h - table->first) / scale;
- inner = table->children[index].table;
return(omapi_handle_lookup_in(o, h, table->children[index].table, op));
}
diff --git a/omapip/listener.c b/omapip/listener.c
index 0c4dcb1..30259eb 100644
--- a/omapip/listener.c
+++ b/omapip/listener.c
@@ -3,6 +3,7 @@
Subroutines that support the generic listener object. */
/*
+ * Copyright (c) 2012 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 2004,2007,2009 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1999-2003 by Internet Software Consortium
*
@@ -124,7 +125,7 @@ isc_result_t omapi_listen_addr (omapi_object_t *h,
status = ISC_R_UNEXPECTED;
goto error_exit;
}
-
+
#if defined (HAVE_SETFD)
if (fcntl (obj -> socket, F_SETFD, 1) < 0) {
status = ISC_R_UNEXPECTED;
@@ -140,7 +141,7 @@ isc_result_t omapi_listen_addr (omapi_object_t *h,
status = ISC_R_UNEXPECTED;
goto error_exit;
}
-
+
/* Try to bind to the wildcard address using the port number
we were given. */
i = bind (obj -> socket,
@@ -369,6 +370,10 @@ static void trace_listener_accept_input (trace_type_t *ttype,
obj = (omapi_connection_object_t *)0;
status = omapi_listener_connect (&obj,
lp, 0, &remote_addr);
+ if (status != ISC_R_SUCCESS) {
+ log_error("%s:%d: OMAPI: Failed to connect "
+ "a listener.", MDL);
+ }
omapi_listener_dereference (&lp, MDL);
return;
}
diff --git a/omapip/protocol.c b/omapip/protocol.c
index 1a6d7e8..9906489 100644
--- a/omapip/protocol.c
+++ b/omapip/protocol.c
@@ -3,7 +3,8 @@
Functions supporting the object management protocol... */
/*
- * Copyright (c) 2004-2007,2009 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2009,2012 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2007 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
@@ -926,12 +927,10 @@ isc_result_t omapi_protocol_destroy (omapi_object_t *h,
dfree (p -> default_auth, file, line);
while (p -> remote_auth_list) {
- omapi_remote_auth_t *r = p -> remote_auth_list -> next;
- p -> remote_auth_list = r;
- if (r) {
- omapi_object_dereference (&r -> a, file, line);
- dfree (r, file, line);
- }
+ omapi_remote_auth_t *r = p -> remote_auth_list;
+ p -> remote_auth_list = p -> remote_auth_list -> next;
+ omapi_object_dereference (&r -> a, file, line);
+ dfree (r, file, line);
}
return ISC_R_SUCCESS;
}