summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--RELNOTES3
-rw-r--r--omapip/protocol.c12
-rw-r--r--server/omapi.c7
3 files changed, 16 insertions, 6 deletions
diff --git a/RELNOTES b/RELNOTES
index 0c9842cb..bcd9e470 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -27,6 +27,9 @@ the README file.
Changes since 3.1.0b1
+- Fixed a bug that caused OMAPI clients to freeze when opening lease
+ objects.
+
- A new server config option "fqdn-reply" specifies whether the server
should send out option 81 (FQDN). Defaults to "on". If set to "off",
the FQDN option is not sent, even if the client requested it. This is
diff --git a/omapip/protocol.c b/omapip/protocol.c
index f5bbb0c7..281c1e4f 100644
--- a/omapip/protocol.c
+++ b/omapip/protocol.c
@@ -34,7 +34,7 @@
#ifndef lint
static char ocopyright[] =
-"$Id: protocol.c,v 1.30 2006/02/24 23:16:30 dhankins Exp $ Copyright 2004-2006 Internet Systems Consortium.";
+"$Id: protocol.c,v 1.31 2007/05/07 17:19:17 each Exp $ Copyright 2004-2006 Internet Systems Consortium.";
#endif
#include <omapip/omapip_p.h>
@@ -150,6 +150,10 @@ isc_result_t omapi_protocol_send_intro (omapi_object_t *h,
return ISC_R_SUCCESS;
}
+#ifdef DEBUG_PROTOCOL
+extern const char *omapi_message_op_name(int);
+#endif /* DEBUG_PROTOCOL */
+
isc_result_t omapi_protocol_send_message (omapi_object_t *po,
omapi_object_t *id,
omapi_object_t *mo,
@@ -176,9 +180,9 @@ isc_result_t omapi_protocol_send_message (omapi_object_t *po,
om = (omapi_message_object_t *)omo;
#ifdef DEBUG_PROTOCOL
- log_debug ("omapi_protocol_send_message()"
- "op=%ld handle=%#lx id=%#lx rid=%#lx",
- (long)m -> op,
+ log_debug ("omapi_protocol_send_message(): "
+ "op=%s handle=%#lx id=%#lx rid=%#lx",
+ omapi_message_op_name (m->op),
(long)(m -> object ? m -> object -> handle : m -> handle),
(long)p -> next_xid, (long)m -> rid);
#endif
diff --git a/server/omapi.c b/server/omapi.c
index 4caf8e34..af6b5b1d 100644
--- a/server/omapi.c
+++ b/server/omapi.c
@@ -41,7 +41,7 @@
#ifndef lint
static char copyright[] =
-"$Id: omapi.c,v 1.59 2006/10/27 22:54:13 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
+"$Id: omapi.c,v 1.60 2007/05/07 17:19:17 each Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -703,8 +703,11 @@ isc_result_t dhcp_lease_stuff_values (omapi_object_t *c,
status = omapi_connection_put_name (c, "flags");
if (status != ISC_R_SUCCESS)
return status;
+ status = omapi_connection_put_uint32(c, sizeof(flagbuf));
+ if (status != ISC_R_SUCCESS)
+ return status;
flagbuf = lease->flags & EPHEMERAL_FLAGS;
- status = omapi_connection_copyin(c, &flagbuf, 1);
+ status = omapi_connection_copyin(c, &flagbuf, sizeof(flagbuf));
if (status != ISC_R_SUCCESS)
return status;