diff options
author | Alexandra Ellwood <lxs@mit.edu> | 2008-08-20 18:46:46 +0000 |
---|---|---|
committer | Alexandra Ellwood <lxs@mit.edu> | 2008-08-20 18:46:46 +0000 |
commit | 7ac8c2023422a829a3fdfa81b576a2910c232458 (patch) | |
tree | 4212661bda590586bc5b4783c13c99177d9ad388 /src/ccapi/server/ccs_cache_collection.c | |
parent | 19093104b11c62dbacb8ce985404862b8eaf0664 (diff) | |
download | krb5-7ac8c2023422a829a3fdfa81b576a2910c232458.tar.gz krb5-7ac8c2023422a829a3fdfa81b576a2910c232458.tar.xz krb5-7ac8c2023422a829a3fdfa81b576a2910c232458.zip |
Notify clients on ccache deletion
Clients watching a ccache or the cache collection
should get a notification when the ccache is destroyed.
ticket: new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20678 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/ccapi/server/ccs_cache_collection.c')
-rw-r--r-- | src/ccapi/server/ccs_cache_collection.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/ccapi/server/ccs_cache_collection.c b/src/ccapi/server/ccs_cache_collection.c index 02d4d8f7d..a1531bdb3 100644 --- a/src/ccapi/server/ccs_cache_collection.c +++ b/src/ccapi/server/ccs_cache_collection.c @@ -320,15 +320,28 @@ cc_int32 ccs_cache_collection_destroy_ccache (ccs_cache_collection_t io_cache_c cci_identifier_t in_identifier) { cc_int32 err = ccNoError; + ccs_ccache_t ccache = NULL; if (!io_cache_collection) { err = cci_check_error (ccErrBadParam); } if (!in_identifier ) { err = cci_check_error (ccErrBadParam); } if (!err) { + err = ccs_cache_collection_find_ccache (io_cache_collection, + in_identifier, + &ccache); + } + + if (!err) { + /* Notify before deletion because after deletion the ccache + * will no longer exist (and won't know about its clients) */ + err = ccs_ccache_changed (ccache, io_cache_collection); + } + + if (!err) { err = ccs_ccache_list_remove (io_cache_collection->ccaches, in_identifier); } - + return cci_check_error (err); } |