X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=NativeLauncher%2Ftool%2Fprivilege_common.cc;h=737a971f3978c36ad17cb68cb772c5a36afcd0dc;hb=d152eafc15a49f31af42aa976e251e823767c069;hp=04314bf4a603020ab04d303a6d75cb36401f2a50;hpb=2bb492246779cda66e101bf6cb728858444fbb90;p=platform%2Fcore%2Fdotnet%2Flauncher.git diff --git a/NativeLauncher/tool/privilege_common.cc b/NativeLauncher/tool/privilege_common.cc index 04314bf..737a971 100644 --- a/NativeLauncher/tool/privilege_common.cc +++ b/NativeLauncher/tool/privilege_common.cc @@ -20,12 +20,12 @@ #include "launcher_env.h" static const char* INTERNET_PRIVILEGE = "http://tizen.org/privilege/internet"; -bool isInternetPrivilegeExisted = false; static int checkInternetPrivilegeCb(const char *privilegeName, void *user_data) { + bool* ret = (bool*)user_data; if (!strcmp(privilegeName, INTERNET_PRIVILEGE)) { - isInternetPrivilegeExisted = true; + *ret = true; return -1; } return 0; @@ -33,13 +33,14 @@ static int checkInternetPrivilegeCb(const char *privilegeName, void *user_data) void checkInternetPrivilegeAndDisableIPv6(const char* pkgId, const std::string& rootPath) { + bool isInternetPrivilegeExisted = false; pkgmgrinfo_pkginfo_h pkg_handle; int ret = pkgmgrGetPkgInfo(pkgId, &pkg_handle); if (ret != 0) { return; } - ret = pkgmgrinfo_pkginfo_foreach_privilege(pkg_handle, checkInternetPrivilegeCb, NULL); + ret = pkgmgrinfo_pkginfo_foreach_privilege(pkg_handle, checkInternetPrivilegeCb, &isInternetPrivilegeExisted); if (ret != PMINFO_R_OK) { _SERR("Failed to pkgmgrinfo_pkginfo_foreach_privilege"); pkgmgrinfo_pkginfo_destroy_pkginfo(pkg_handle);