summaryrefslogtreecommitdiffstats
path: root/source3/lib/gencache.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-02-03 21:19:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:06:23 -0500
commit855e02f1649992f05b685be96dfff4a9140170e9 (patch)
treef3224a28b08d3d569f929039e0bd7313ab81dbd9 /source3/lib/gencache.c
parent989c9311c5c155a8bea2b7921edf5eeb36c54ead (diff)
downloadsamba-855e02f1649992f05b685be96dfff4a9140170e9.tar.gz
samba-855e02f1649992f05b685be96dfff4a9140170e9.tar.xz
samba-855e02f1649992f05b685be96dfff4a9140170e9.zip
r13310: first round of server affinity patches for winbindd & net ads join
(This used to be commit 6c3480f9aecc061660ad5c06347b8f1d3e11a330)
Diffstat (limited to 'source3/lib/gencache.c')
-rw-r--r--source3/lib/gencache.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c
index fd44616270..89badcd4f9 100644
--- a/source3/lib/gencache.c
+++ b/source3/lib/gencache.c
@@ -268,7 +268,7 @@ BOOL gencache_get(const char *keystr, char **valstr, time_t *timeout)
SAFE_FREE(entry_buf);
DEBUG(10, ("Returning %s cache entry: key = %s, value = %s, "
- "timeout = %s\n", t > time(NULL) ? "valid" :
+ "timeout = %s", t > time(NULL) ? "valid" :
"expired", keystr, v, ctime(&t)));
if (valstr)
@@ -281,20 +281,18 @@ BOOL gencache_get(const char *keystr, char **valstr, time_t *timeout)
return t > time(NULL);
- } else {
- SAFE_FREE(databuf.dptr);
+ }
- if (valstr)
- *valstr = NULL;
+ SAFE_FREE(databuf.dptr);
- if (timeout)
- timeout = NULL;
+ if (valstr)
+ *valstr = NULL;
+ if (timeout)
+ timeout = NULL;
- DEBUG(10, ("Cache entry with key = %s couldn't be found\n",
- keystr));
+ DEBUG(10, ("Cache entry with key = %s couldn't be found\n", keystr));
- return False;
- }
+ return False;
}