andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone

Blame SOURCES/0010-Issue-50655-access-log-etime-is-not-properly-formatt.patch

4c04d8
From f4a5a7f3074e15c3439fd906bef78568bd6ab13c Mon Sep 17 00:00:00 2001
47a30d
From: Mark Reynolds <mreynolds@redhat.com>
47a30d
Date: Wed, 16 Oct 2019 16:52:59 -0400
47a30d
Subject: [PATCH] Issue 50655 - access log etime is not properly formatted
47a30d
47a30d
Description:  The wrong printf format was used for displaying the nanosecond etime
47a30d
              in the access log.
47a30d
47a30d
relates: https://pagure.io/389-ds-base/issue/50655
47a30d
47a30d
Reviewed by: firstyear(Thanks!)
47a30d
---
47a30d
 ldap/servers/slapd/result.c | 3 ++-
47a30d
 1 file changed, 2 insertions(+), 1 deletion(-)
47a30d
47a30d
diff --git a/ldap/servers/slapd/result.c b/ldap/servers/slapd/result.c
4c04d8
index 34ddd8566..61e7a70f9 100644
47a30d
--- a/ldap/servers/slapd/result.c
47a30d
+++ b/ldap/servers/slapd/result.c
4c04d8
@@ -1925,7 +1925,8 @@ log_result(Slapi_PBlock *pb, Operation *op, int err, ber_tag_t tag, int nentries
47a30d
     struct timespec o_hr_time_end;
47a30d
     slapi_operation_time_elapsed(op, &o_hr_time_end);
47a30d
 
47a30d
-    snprintf(etime, ETIME_BUFSIZ, "%" PRId64 ".%010" PRId64 "", (int64_t)o_hr_time_end.tv_sec, (int64_t)o_hr_time_end.tv_nsec);
47a30d
+
47a30d
+    snprintf(etime, ETIME_BUFSIZ, "%" PRId64 ".%.09" PRId64 "", (int64_t)o_hr_time_end.tv_sec, (int64_t)o_hr_time_end.tv_nsec);
47a30d
 
47a30d
     slapi_pblock_get(pb, SLAPI_OPERATION_NOTES, &operation_notes);
47a30d
 
47a30d
-- 
4c04d8
2.21.0
47a30d