]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Use timeval_str_buf() in defer_open()
authorVolker Lendecke <vl@samba.org>
Thu, 1 Aug 2019 11:24:49 +0000 (13:24 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 6 Aug 2019 21:49:29 +0000 (21:49 +0000)
Also make this a hires timestamp for better debugging.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/open.c

index c81696d3831fa58f47bb883e844861311c7173f3..206450962dd7507d7e5edc957b056058abc35ff9 100644 (file)
@@ -40,6 +40,7 @@
 #include "source3/lib/dbwrap/dbwrap_watch.h"
 #include "locking/leases_db.h"
 #include "librpc/gen_ndr/ndr_leases_db.h"
+#include "lib/util/time_basic.h"
 
 extern const struct generic_mapping file_generic_mapping;
 
@@ -2424,14 +2425,15 @@ static void defer_open(struct share_mode_lock *lck,
        struct timeval abs_timeout;
        struct defer_open_state *watch_state;
        struct tevent_req *watch_req;
+       struct timeval_buf tvbuf1, tvbuf2;
        bool ok;
 
        abs_timeout = timeval_sum(&req->request_time, &timeout);
 
        DBG_DEBUG("request time [%s] timeout [%s] mid [%" PRIu64 "] "
                  "delayed_for_oplocks [%s] file_id [%s]\n",
-                 timeval_string(talloc_tos(), &req->request_time, false),
-                 timeval_string(talloc_tos(), &abs_timeout, false),
+                 timeval_str_buf(&req->request_time, false, true, &tvbuf1),
+                 timeval_str_buf(&abs_timeout, false, true, &tvbuf2),
                  req->mid,
                  delayed_for_oplocks ? "yes" : "no",
                  file_id_string_tos(&id));