-/*****************************************************************************
-Update LAST-Set counter inside the cache
-*****************************************************************************/
-
-static BOOL account_policy_cache_timestamp(uint32 *value, BOOL update,
- const char *ap_name)
-{
- pstring key;
- uint32 val = 0;
- time_t now;
-
- if (ap_name == NULL)
- return False;
-
- slprintf(key, sizeof(key)-1, "%s/%s", ap_name, AP_LASTSET);
-
- if (!init_account_policy()) {
- return False;
- }
-
- if (!tdb_fetch_uint32(tdb, key, &val) && !update) {
- DEBUG(10,("failed to get last set timestamp of cache\n"));
- return False;
- }
-
- *value = val;
-
- DEBUG(10, ("account policy cache lastset was: %s\n", http_timestring(val)));
-
- if (update) {
-
- now = time(NULL);
-
- if (!tdb_store_uint32(tdb, key, (uint32)now)) {
- DEBUG(1, ("tdb_store_uint32 failed for %s\n", key));
- return False;
- }
- DEBUG(10, ("account policy cache lastset now: %s\n", http_timestring(now)));
- *value = now;
- }
-
- return True;
-}
-