]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Send lease start and end time (Brian Murrell).
authorTed Lemon <source@isc.org>
Fri, 15 Oct 1999 12:34:18 +0000 (12:34 +0000)
committerTed Lemon <source@isc.org>
Fri, 15 Oct 1999 12:34:18 +0000 (12:34 +0000)
server/omapi.c

index bcaaca2c8f76edab3192ff14b2403c1b4c8dea0c..5f198889ab06774e726b7fb11516400232eae702 100644 (file)
@@ -29,7 +29,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: omapi.c,v 1.17 1999/10/14 18:30:52 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: omapi.c,v 1.18 1999/10/15 12:34:18 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -488,6 +488,30 @@ isc_result_t dhcp_lease_stuff_values (omapi_object_t *c,
        if (status != ISC_R_SUCCESS)
                return status;
 
+
+       status = omapi_connection_put_name (c, "ends");
+       if (status != ISC_R_SUCCESS)
+               return status;
+       status = omapi_connection_put_uint32 (c, sizeof (TIME));
+       if (status != ISC_R_SUCCESS)
+               return status;
+       status = (omapi_connection_copyin
+                 (c, (const unsigned char *)&(lease -> ends), sizeof(TIME)));
+       if (status != ISC_R_SUCCESS)
+               return status;
+
+       status = omapi_connection_put_name (c, "starts");
+       if (status != ISC_R_SUCCESS)
+               return status;
+       status = omapi_connection_put_uint32 (c, sizeof (TIME));
+       if (status != ISC_R_SUCCESS)
+               return status;
+       status = (omapi_connection_copyin
+                 (c,
+                  (const unsigned char *)&(lease -> starts), sizeof (TIME)));
+       if (status != ISC_R_SUCCESS)
+               return status;
+
        /* Write out the inner object, if any. */
        if (h -> inner && h -> inner -> type -> stuff_values) {
                status = ((*(h -> inner -> type -> stuff_values))