diff options
author | Evan Hunt <each@isc.org> | 2007-05-07 17:18:00 +0000 |
---|---|---|
committer | Evan Hunt <each@isc.org> | 2007-05-07 17:18:00 +0000 |
commit | c25d3b84b76982894a6c71a02532fcc91f5e836d (patch) | |
tree | 2b8a46ceace9c82a13fe0f0652551b835d019139 | |
parent | 0c9cceb14391ddc4151af183dc58b7523aa5a59a (diff) | |
download | isc-dhcp-c25d3b84b76982894a6c71a02532fcc91f5e836d.tar.gz |
Fixed a bug that caused OMAPI clients to hang when opening leases. [rt16495]
-rw-r--r-- | RELNOTES | 3 | ||||
-rw-r--r-- | omapip/protocol.c | 12 | ||||
-rw-r--r-- | server/omapi.c | 7 |
3 files changed, 16 insertions, 6 deletions
@@ -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..a63d72c2 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.30.116.1 2007/05/07 17:18:00 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 99cc4611..9a86e1dd 100644 --- a/server/omapi.c +++ b/server/omapi.c @@ -41,7 +41,7 @@ #ifndef lint static char copyright[] = -"$Id: omapi.c,v 1.58.76.1 2006/10/27 22:54:50 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n"; +"$Id: omapi.c,v 1.58.76.2 2007/05/07 17:18:00 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; |