diff options
author | Gerald Carter <jerry@samba.org> | 2006-02-03 21:19:24 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2006-02-03 21:19:24 +0000 |
commit | ae7207c5a8208acd5935e338aa2473177d4f52f0 (patch) | |
tree | 697cb89c32a94c1bf43fd2d5f8873d995f307ff4 /source/lib/gencache.c | |
parent | f8c735fe578f07b0b663a4f7e79e6f61bca211c0 (diff) | |
download | samba-ae7207c5a8208acd5935e338aa2473177d4f52f0.tar.gz samba-ae7207c5a8208acd5935e338aa2473177d4f52f0.tar.xz samba-ae7207c5a8208acd5935e338aa2473177d4f52f0.zip |
r13310: first round of server affinity patches for winbindd & net ads join
Diffstat (limited to 'source/lib/gencache.c')
-rw-r--r-- | source/lib/gencache.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/source/lib/gencache.c b/source/lib/gencache.c index fd44616270c..89badcd4f97 100644 --- a/source/lib/gencache.c +++ b/source/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; } |