|
|
47a30d |
From c8977a03f2c65978ad7977030d55bc830bc1f852 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
|
|
|
47a30d |
index d9f431cc5..393b3f6cd 100644
|
|
|
47a30d |
--- a/ldap/servers/slapd/result.c
|
|
|
47a30d |
+++ b/ldap/servers/slapd/result.c
|
|
|
47a30d |
@@ -1920,7 +1920,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 |
--
|
|
|
47a30d |
2.21.1
|
|
|
47a30d |
|