andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone
d0a457
From 12672d5bad1b1bbb71a281d33533b1829ab65fbc Mon Sep 17 00:00:00 2001
d0a457
From: Mark Reynolds <mreynolds@redhat.com>
d0a457
Date: Fri, 21 Jun 2019 10:15:19 -0400
d0a457
Subject: [PATCH 2/2] BZ1518320 - entry cache crash fix
d0a457
d0a457
Description: Fix cherry-pick error
d0a457
---
d0a457
 ldap/servers/slapd/time.c | 26 --------------------------
d0a457
 1 file changed, 26 deletions(-)
d0a457
d0a457
diff --git a/ldap/servers/slapd/time.c b/ldap/servers/slapd/time.c
d0a457
index 2a3865858..584bd1e63 100644
d0a457
--- a/ldap/servers/slapd/time.c
d0a457
+++ b/ldap/servers/slapd/time.c
d0a457
@@ -96,32 +96,6 @@ slapi_current_utc_time_hr(void)
d0a457
     return ltnow;
d0a457
 }
d0a457
 
d0a457
-struct timespec
d0a457
-slapi_current_rel_time_hr(void)
d0a457
-{
d0a457
-    struct timespec now;
d0a457
-    clock_gettime(CLOCK_MONOTONIC, &now;;
d0a457
-    return now;
d0a457
-}
d0a457
-
d0a457
-void
d0a457
-slapi_timespec_diff(struct timespec *a, struct timespec *b, struct timespec *diff)
d0a457
-{
d0a457
-    /* Now diff the two */
d0a457
-    time_t sec = a->tv_sec - b->tv_sec;
d0a457
-    int32_t nsec = a->tv_nsec - b->tv_nsec;
d0a457
-
d0a457
-    if (nsec < 0) {
d0a457
-        /* It's negative so take one second */
d0a457
-        sec -= 1;
d0a457
-        /* And set nsec to to a whole value */
d0a457
-        nsec = 1000000000 - nsec;
d0a457
-    }
d0a457
-
d0a457
-    diff->tv_sec = sec;
d0a457
-    diff->tv_nsec = nsec;
d0a457
-}
d0a457
-
d0a457
 time_t
d0a457
 slapi_current_utc_time(void)
d0a457
 {
d0a457
-- 
d0a457
2.21.0
d0a457