The Samba-Bugzilla – Attachment 14963 Details for
Bug 13848
Negative timeout printed while setting an entry in the cache file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for 4.10, 4.9 and 4.8
fix_debug.patch (text/plain), 1.51 KB, created by
Andreas Schneider
on 2019-03-20 17:20:58 UTC
(
hide
)
Description:
patch for 4.10, 4.9 and 4.8
Filename:
MIME Type:
Creator:
Andreas Schneider
Created:
2019-03-20 17:20:58 UTC
Size:
1.51 KB
patch
obsolete
>From 09194135f5b248835d180a928fbb130848b7794d Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >Date: Thu, 17 Jan 2019 13:58:14 +0100 >Subject: [PATCH] s3:lib: Fix the debug message for adding cache entries. > >To get correct values, we need to cast 'timeout' to 'long int' first in >order to do calculation in that integer space! Calculations are don in >the space of the lvalue! > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=13848 > >Signed-off-by: Andreas Schneider <asn@samba.org> >Reviewed-by: Volker Lendecke <vl@samba.org> >(cherry picked from commit 5822449a7340f53987ce4c04851652427f5b49e8) >--- > source3/lib/gencache.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c >index d6ef28c140f..9ad85bbf55f 100644 >--- a/source3/lib/gencache.c >+++ b/source3/lib/gencache.c >@@ -219,11 +219,11 @@ bool gencache_set_data_blob(const char *keystr, DATA_BLOB blob, > dbufs[2] = (TDB_DATA) { .dptr = (uint8_t *)&crc, > .dsize = sizeof(crc) }; > >- DEBUG(10, ("Adding cache entry with key=[%s] and timeout=" >- "[%s] (%d seconds %s)\n", keystr, >+ DBG_DEBUG("Adding cache entry with key=[%s] and timeout=" >+ "[%s] (%ld seconds %s)\n", keystr, > timestring(talloc_tos(), timeout), >- (int)(timeout - time(NULL)), >- timeout > time(NULL) ? "ahead" : "in the past")); >+ ((long int)timeout) - time(NULL), >+ timeout > time(NULL) ? "ahead" : "in the past"); > > ret = tdb_chainlock(cache->tdb, key); > if (ret == -1) { >-- >2.21.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
ab
:
review+
Actions:
View
Attachments on
bug 13848
:
14962
| 14963 |
14970
|
14971