Pass NULL to gencache_get when we are not interested in the timeout value
authorVolker Lendecke <vl@samba.org>
Thu, 3 Jul 2008 13:15:57 +0000 (15:15 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 3 Jul 2008 13:17:58 +0000 (15:17 +0200)
(This used to be commit 16062dfc3dcc8f1ca0024a3ae21effb889c7ffc0)

source3/libads/dns.c
source3/libsmb/namecache.c
source3/libsmb/namequery.c
source3/libsmb/trustdom_cache.c
source3/torture/torture.c

index 3a9e8496685b165e40b1166931f99c793e4f48e0..a8825d32e62b83cc88be396ce35c7bf68cd9b6d3 100644 (file)
@@ -790,7 +790,6 @@ bool sitename_store(const char *realm, const char *sitename)
 char *sitename_fetch(const char *realm)
 {
        char *sitename = NULL;
-       time_t timeout;
        bool ret = False;
        const char *query_realm;
        char *key;
@@ -807,7 +806,7 @@ char *sitename_fetch(const char *realm)
 
        key = sitename_key(query_realm);
 
-       ret = gencache_get( key, &sitename, &timeout );
+       ret = gencache_get( key, &sitename, NULL );
        SAFE_FREE(key);
        if ( !ret ) {
                DEBUG(5,("sitename_fetch: No stored sitename for %s\n",
index ba706e5ee26488c7ea533a1db7bfec03550e1c0d..1f462ba79adf621b1121f62c207aa4485a5a16b9 100644 (file)
@@ -200,7 +200,6 @@ bool namecache_fetch(const char *name,
                        int *num_names)
 {
        char *key, *value;
-       time_t timeout;
 
        /* exit now if null pointers were passed as they're required further */
        if (!ip_list || !num_names) {
@@ -225,7 +224,7 @@ bool namecache_fetch(const char *name,
                return False;
        }
 
-       if (!gencache_get(key, &value, &timeout)) {
+       if (!gencache_get(key, &value, NULL)) {
                DEBUG(5, ("no entry for %s#%02X found.\n", name, name_type));
                SAFE_FREE(key);
                return False;
@@ -367,7 +366,6 @@ bool namecache_status_fetch(const char *keyname,
 {
        char *key = NULL;
        char *value = NULL;
-       time_t timeout;
 
        if (!gencache_init())
                return False;
@@ -377,7 +375,7 @@ bool namecache_status_fetch(const char *keyname,
        if (!key)
                return False;
 
-       if (!gencache_get(key, &value, &timeout)) {
+       if (!gencache_get(key, &value, NULL)) {
                DEBUG(5, ("namecache_status_fetch: no entry for %s found.\n",
                                        key));
                SAFE_FREE(key);
index 24d7ee1a9c5b98056de496d905756f3f107ecebe..9b50d209b919360f616fa0711ce6929862b74134 100644 (file)
@@ -112,7 +112,6 @@ bool saf_delete( const char *domain )
 char *saf_fetch( const char *domain )
 {
        char *server = NULL;
-       time_t timeout;
        bool ret = False;
        char *key = NULL;
 
@@ -126,7 +125,7 @@ char *saf_fetch( const char *domain )
 
        key = saf_key( domain );
 
-       ret = gencache_get( key, &server, &timeout );
+       ret = gencache_get( key, &server, NULL );
 
        SAFE_FREE( key );
 
index 6755de3814bb05c7174ed2b0f2e0af6704d88b33..92dde0c6c8030f4305df574f7aa3873137b6c700 100644 (file)
@@ -164,7 +164,6 @@ bool trustdom_cache_store(char* name, char* alt_name, const DOM_SID *sid,
 bool trustdom_cache_fetch(const char* name, DOM_SID* sid)
 {
        char *key = NULL, *value = NULL;
-       time_t timeout;
 
        /* init the cache */
        if (!gencache_init())
@@ -179,7 +178,7 @@ bool trustdom_cache_fetch(const char* name, DOM_SID* sid)
        if (!key)
                return False;
        
-       if (!gencache_get(key, &value, &timeout)) {
+       if (!gencache_get(key, &value, NULL)) {
                DEBUG(5, ("no entry for trusted domain %s found.\n", name));
                SAFE_FREE(key);
                return False;
@@ -207,14 +206,13 @@ bool trustdom_cache_fetch(const char* name, DOM_SID* sid)
 uint32 trustdom_cache_fetch_timestamp( void )
 {
        char *value = NULL;
-       time_t timeout;
        uint32 timestamp;
 
        /* init the cache */
        if (!gencache_init()) 
                return False;
                
-       if (!gencache_get(TDOMTSKEY, &value, &timeout)) {
+       if (!gencache_get(TDOMTSKEY, &value, NULL)) {
                DEBUG(5, ("no timestamp for trusted domain cache located.\n"));
                SAFE_FREE(value);
                return 0;
index d8add208f52e21f27506450b8c02a936d1cf2c50..98dd900941dd47598aebf24200b404854bc43671 100644 (file)
@@ -4933,7 +4933,7 @@ static bool run_local_gencache(int dummy)
                return False;
        }
 
-       if (!gencache_get("foo", &val, &tm)) {
+       if (!gencache_get("foo", &val, NULL)) {
                d_printf("%s: gencache_get() failed\n", __location__);
                return False;
        }
@@ -4957,7 +4957,7 @@ static bool run_local_gencache(int dummy)
                return False;
        }
                        
-       if (gencache_get("foo", &val, &tm)) {
+       if (gencache_get("foo", &val, NULL)) {
                d_printf("%s: gencache_get() on deleted entry "
                         "succeeded\n", __location__);
                return False;