]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Fixed a bug that caused OMAPI clients to hang when opening leases. [rt16495]
authorEvan Hunt <each@isc.org>
Mon, 7 May 2007 17:19:17 +0000 (17:19 +0000)
committerEvan Hunt <each@isc.org>
Mon, 7 May 2007 17:19:17 +0000 (17:19 +0000)
RELNOTES
omapip/protocol.c
server/omapi.c

index 0c9842cbce17f939c757ae1ba72bdac0346a1e2c..bcd9e470824da3fe9a38166e40ff065c2576d53c 100644 (file)
--- 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
index f5bbb0c7c94e2ec0d1f9bf2e5c1c366b6f1c64e7..281c1e4fad6cda21a58af2b823aa478fd82d6d91 100644 (file)
@@ -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
index 4caf8e34d10f11c68f95ede1ea299610f6bdd0b7..af6b5b1d8ad12363f97706eb64bbb16b8fb7fae9 100644 (file)
@@ -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"
@@ -701,10 +701,13 @@ isc_result_t dhcp_lease_stuff_values (omapi_object_t *c,
                return status;
 
        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;