From a777ca7c1d08f9e2f44518b0038bb69d2e6c5b07 Mon Sep 17 00:00:00 2001 From: Minje Ahn Date: Wed, 18 May 2016 17:36:11 +0900 Subject: [PATCH] Change cynara cache size Change-Id: I6b1eb47a171962e605e70a334ed83868c1f88004 Signed-off-by: Minje Ahn --- lib/media-util-cynara.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/lib/media-util-cynara.c b/lib/media-util-cynara.c index defe3a1..4816e48 100755 --- a/lib/media-util-cynara.c +++ b/lib/media-util-cynara.c @@ -55,6 +55,7 @@ #endif static cynara *_cynara = NULL; +static cynara_configuration *_p_conf = NULL; G_LOCK_DEFINE_STATIC(cynara_mutex); static void ms_cynara_dbg_err(const char *prefix, int error_code) @@ -73,12 +74,26 @@ static void ms_cynara_dbg_err(const char *prefix, int error_code) int ms_cynara_initialize(void) { - int ret = cynara_initialize(&_cynara, NULL); - if (ret != CYNARA_API_SUCCESS) { + int ret = 0; + + ret = cynara_configuration_create(&_p_conf); + if (ret != CYNARA_API_SUCCESS) { + ms_cynara_dbg_err("cynara_configuration_create", ret); + return MS_MEDIA_ERR_INTERNAL; + } + ret = cynara_configuration_set_cache_size(_p_conf, 100); + if (ret != CYNARA_API_SUCCESS) { + ms_cynara_dbg_err("cynara_configuration_set_cache_size", ret); + return MS_MEDIA_ERR_INTERNAL; + } + ret = cynara_initialize(&_cynara, _p_conf); + if (ret != CYNARA_API_SUCCESS) { ms_cynara_dbg_err("cynara_initialize", ret); return MS_MEDIA_ERR_INTERNAL; } + cynara_configuration_destroy(_p_conf); + return MS_MEDIA_ERR_NONE; } -- 2.7.4