diff options
author | Volker Lendecke <vl@samba.org> | 2009-07-10 12:03:35 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-07-15 10:55:20 +0200 |
commit | e5a34b2533720ebb9181c0edebad6774ceeff189 (patch) | |
tree | 04d46d81cdfffa0306b3659d28f5224ec06500ba /source3 | |
parent | 3e965d017d243f0a99e7838e6c92c37df270486c (diff) | |
download | samba-e5a34b2533720ebb9181c0edebad6774ceeff189.tar.gz samba-e5a34b2533720ebb9181c0edebad6774ceeff189.tar.bz2 samba-e5a34b2533720ebb9181c0edebad6774ceeff189.zip |
Remove gencache_[un]lock_key
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 2 | ||||
-rw-r--r-- | source3/lib/gencache.c | 25 | ||||
-rw-r--r-- | source3/libsmb/dsgetdcname.c | 6 |
3 files changed, 0 insertions, 33 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index 0dd1e98c86..52ca7826ed 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -524,8 +524,6 @@ bool gencache_get_data_blob(const char *keystr, DATA_BLOB *blob, bool *expired); bool gencache_set_data_blob(const char *keystr, const DATA_BLOB *blob, time_t timeout); void gencache_iterate(void (*fn)(const char* key, const char *value, time_t timeout, void* dptr), void* data, const char* keystr_pattern); -int gencache_lock_entry( const char *key ); -void gencache_unlock_entry( const char *key ); /* The following definitions come from lib/interface.c */ diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c index 0e099f0dd0..c94fb78541 100644 --- a/source3/lib/gencache.c +++ b/source3/lib/gencache.c @@ -483,28 +483,3 @@ void gencache_iterate(void (*fn)(const char* key, const char *value, time_t time state.priv = data; tdb_traverse(cache, gencache_iterate_fn, &state); } - -/******************************************************************** - lock a key -********************************************************************/ - -int gencache_lock_entry( const char *key ) -{ - if (!gencache_init()) - return -1; - - return tdb_lock_bystring(cache, key); -} - -/******************************************************************** - unlock a key -********************************************************************/ - -void gencache_unlock_entry( const char *key ) -{ - if (!gencache_init()) - return; - - tdb_unlock_bystring(cache, key); - return; -} diff --git a/source3/libsmb/dsgetdcname.c b/source3/libsmb/dsgetdcname.c index fb87b4dc9a..8dee6926d2 100644 --- a/source3/libsmb/dsgetdcname.c +++ b/source3/libsmb/dsgetdcname.c @@ -171,14 +171,8 @@ static NTSTATUS dsgetdcname_cache_store(TALLOC_CTX *mem_ctx, expire_time = time(NULL) + DSGETDCNAME_CACHE_TTL; - if (gencache_lock_entry(key) != 0) { - return NT_STATUS_LOCK_NOT_GRANTED; - } - ret = gencache_set_data_blob(key, blob, expire_time); - gencache_unlock_entry(key); - return ret ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL; } |