Flush zrtp cache automatically

Add option to flush zrtp cache to persistent storage automatically
immediately after the cache is modified. See
zrtp_config_t#cache_auto_store.

Modified-by: Travis Cross <tc@traviscross.com>
Signed-off-by: Travis Cross <tc@traviscross.com>
This commit is contained in:
Viktor Krykun
2013-02-11 16:41:51 +00:00
committed by Travis Cross
parent 551938b89b
commit e4daefbadc
3 changed files with 27 additions and 1 deletions
+11
View File
@@ -161,6 +161,17 @@ typedef struct zrtp_config_t
/** @brief Path to zrtp cache file (set if you use built-in realization) */
zrtp_string256_t def_cache_path;
/**
* @brief Flush the cache automatically
* Set to 1 if you want libzrtp to flush the cache to the persistent storage
* right after it is modified. If cache_auto_store is 0, libzrtp will flush
* the cache on going down only and the app is responsible for storing the
* cache in unexpected situations. Enabled by default.
*
* @sa zrtp_def_cache_store()
*/
unsigned cache_auto_store;
} zrtp_config_t;
/**