lib: Avoid a gencache_parse when setting a delete marker
authorVolker Lendecke <vl@samba.org>
Thu, 3 Mar 2016 16:39:09 +0000 (17:39 +0100)
committerRalph Boehme <slow@samba.org>
Mon, 7 Mar 2016 16:58:16 +0000 (17:58 +0100)
We know that we want to put something into _notrans, no point in
doing another round trip into gencache.tdb.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/lib/gencache.c

index e506b3be5f1f19264d5eb003d8be9801f6684647..84d273e4f24aaf65d980a71b3b17bfb2729468e2 100644 (file)
@@ -296,7 +296,7 @@ bool gencache_set_data_blob(const char *keystr, const DATA_BLOB *blob,
                return false;
        }
 
-       if (gencache_have_val(keystr, blob, timeout)) {
+       if ((timeout != 0) && gencache_have_val(keystr, blob, timeout)) {
                DEBUG(10, ("Did not store value for %s, we already got it\n",
                           keystr));
                return true;