{
char *lease_entries = NULL;
virJSONValuePtr leases_array = NULL;
- long long currtime = 0;
long long expirytime;
int custom_lease_file_len = 0;
virJSONValuePtr lease_tmp = NULL;
size_t i;
int ret = -1;
- currtime = (long long) time(NULL);
-
/* Read entire contents */
if ((custom_lease_file_len = virFileReadAll(custom_lease_file,
VIR_NETWORK_DHCP_LEASE_FILE_SIZE_MAX,
_("failed to parse json"));
goto cleanup;
}
- /* Check whether lease has expired or not */
- if (expirytime < currtime) {
- i++;
- continue;
- }
/* Check whether lease has to be included or not */
if (ip_to_delete && STREQ(ip_tmp, ip_to_delete)) {