summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunghyun Kim <jh1114.kim@samsung.com>2012-09-11 16:23:57 +0900
committerJunghyun Kim <jh1114.kim@samsung.com>2012-09-11 16:26:37 +0900
commit8c0f4db2b474e76f80a66163b31571b0255b9ec5 (patch)
tree81c150052e7b4e70d745134c3f8f3c7f10809cca
parentd629f3d513be75ba01b9e74eaf4dc82474fbbc69 (diff)
downloadtaskmanager-8c0f4db2b474e76f80a66163b31571b0255b9ec5.tar.gz
taskmanager-8c0f4db2b474e76f80a66163b31571b0255b9ec5.tar.bz2
taskmanager-8c0f4db2b474e76f80a66163b31571b0255b9ec5.zip
Add retry cnt for fail to get running app info
Change-Id: Id03afb72ad6bd5cf203891f7c1fb58faa52c4d4e
-rwxr-xr-xsrc/_genlist.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/_genlist.c b/src/_genlist.c
index 480db80..43089d5 100755
--- a/src/_genlist.c
+++ b/src/_genlist.c
@@ -679,13 +679,21 @@ void _set_genlist(struct appdata *ad)
_D("func\n");
retm_if(ad == NULL, "Invalid argument: appdata is NULL\n");
int ret = AUL_R_ERROR;
+ int retry_cnt = 0;
+ int sleep_value = 1000;
_init_grp_cnt();
- ret = aul_app_get_running_app_info(runapp_info_get, ad);
+ while (ret != AUL_R_OK && retry_cnt < 5) {
+ usleep(sleep_value);
+ ret = aul_app_get_running_app_info(runapp_info_get, ad);
- if (ret != AUL_R_OK) {
- _D("Fail to get running app information from ail");
+ if (ret != AUL_R_OK) {
+ _D("Fail to get running app information from ail");
+ }
+
+ retry_cnt++;
+ sleep_value *= 2;
}
taskmanager_get_history_app_info(ad);