#50656 Issue 50655 - access log etime is not properly formatted
Closed 3 years ago by spichugi. Opened 4 years ago by mreynolds.
mreynolds/389-ds-base issue50655  into  master

file modified
+2 -1
@@ -1991,7 +1991,8 @@ 

      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);

  

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: ?

I think it should be .%09 because the 0 is a left-padding character when the input is < 9 which can/will happen.

rebased onto 225f4e1

4 years ago

I think it should be .%09 because the 0 is a left-padding character when the input is < 9 which can/will happen.

Yeah this seems to give the expected results. Patch has been updated...

Ack :) thanks for fixing william-of-the-pasts mistake.

Pull-Request has been merged by mreynolds

4 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3711

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

3 years ago
Metadata