summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-01-24 21:20:31 +0000
committerGerald Carter <jerry@samba.org>2003-01-24 21:20:31 +0000
commit7cc3cf9410dedcf242254ff017c28cabb86276c6 (patch)
treef97d460e277d44727749bf439a85de7d93fe167a /source3
parentac49b63c1c692fe0cf173a5b40dc35ff15ba1194 (diff)
downloadsamba-7cc3cf9410dedcf242254ff017c28cabb86276c6.tar.gz
samba-7cc3cf9410dedcf242254ff017c28cabb86276c6.tar.bz2
samba-7cc3cf9410dedcf242254ff017c28cabb86276c6.zip
masking an assert error in Tim's wins server checking code; needs a proper fix after I talk to tpot
(This used to be commit 607bc0b4fca38640c6b5c730aa4119e2aa9006fc)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/gencache.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c
index d0748456f9..3ff67b9918 100644
--- a/source3/lib/gencache.c
+++ b/source3/lib/gencache.c
@@ -233,7 +233,9 @@ BOOL gencache_get(const char *keystr, char **valstr, time_t *timeout)
TDB_DATA keybuf, databuf;
/* fail completely if get null pointers passed */
+#if 0 /* JERRY */
SMB_ASSERT(keystr && valstr && timeout);
+#endif
if (!gencache_init())
return False;
@@ -242,6 +244,15 @@ BOOL gencache_get(const char *keystr, char **valstr, time_t *timeout)
keybuf.dsize = strlen(keystr);
databuf = tdb_fetch(cache, keybuf);
+ /* special case for tpot */
+ if ( !valstr && !timeout ) {
+ BOOL result = False;
+
+ result = (databuf.dptr == NULL);
+ SAFE_FREE(databuf.dptr);
+ return result;
+ }
+
if (databuf.dptr && databuf.dsize > TIMEOUT_LEN) {
char* entry_buf = strndup(databuf.dptr, databuf.dsize);
*valstr = (char*)malloc(sizeof(char) * (databuf.dsize - TIMEOUT_LEN));