summaryrefslogtreecommitdiff
path: root/server/omapi.c
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>1999-10-15 12:34:18 +0000
committerTed Lemon <source@isc.org>1999-10-15 12:34:18 +0000
commit0d124b666471d7bd75dace1282316c31a65fda88 (patch)
treecba287c7ceb69b89af3c199b305f8f6a70f341a6 /server/omapi.c
parentc7775a73f68a078fd5a6085b93cd237302e1065c (diff)
downloadisc-dhcp-0d124b666471d7bd75dace1282316c31a65fda88.tar.gz
Send lease start and end time (Brian Murrell).
Diffstat (limited to 'server/omapi.c')
-rw-r--r--server/omapi.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/server/omapi.c b/server/omapi.c
index bcaaca2c..5f198889 100644
--- a/server/omapi.c
+++ b/server/omapi.c
@@ -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))