From: Ted Lemon Date: Fri, 15 Oct 1999 12:34:18 +0000 (+0000) Subject: Send lease start and end time (Brian Murrell). X-Git-Tag: BCTEL_SPECIAL_19991124~104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d124b666471d7bd75dace1282316c31a65fda88;p=thirdparty%2Fdhcp.git Send lease start and end time (Brian Murrell). --- diff --git a/server/omapi.c b/server/omapi.c index bcaaca2c8..5f198889a 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))