From 225f4e179d4d61cbcf5991cf99a1a6fa49070311 Mon Sep 17 00:00:00 2001 From: Mark Reynolds Date: Oct 16 2019 21:00:05 +0000 Subject: Issue 50655 - access log etime is not properly formatted Description: The wrong printf format was used for displaying the nanosecond etime in the access log. relates: https://pagure.io/389-ds-base/issue/50655 Reviewed by: firstyear(Thanks!) --- diff --git a/ldap/servers/slapd/result.c b/ldap/servers/slapd/result.c index 8ea0042..89f7767 100644 --- a/ldap/servers/slapd/result.c +++ b/ldap/servers/slapd/result.c @@ -1991,7 +1991,8 @@ log_result(Slapi_PBlock *pb, Operation *op, int err, ber_tag_t tag, int nentries struct timespec o_hr_time_end; slapi_operation_time_elapsed(op, &o_hr_time_end); - snprintf(etime, ETIME_BUFSIZ, "%" PRId64 ".%010" PRId64 "", (int64_t)o_hr_time_end.tv_sec, (int64_t)o_hr_time_end.tv_nsec); + + snprintf(etime, ETIME_BUFSIZ, "%" PRId64 ".%.09" PRId64 "", (int64_t)o_hr_time_end.tv_sec, (int64_t)o_hr_time_end.tv_nsec); operation_notes = slapi_pblock_get_operation_notes(pb);