prevent related issues
authorYong Song <yong.song@samsung.com>
Mon, 12 Aug 2013 07:56:01 +0000 (16:56 +0900)
committerYong Song <yong.song@samsung.com>
Mon, 12 Aug 2013 08:03:28 +0000 (17:03 +0900)
Change-Id: I5e218c2bd045e18485734d3d311cb86fc961c7f9

src/app/FApp_AppControlManager.cpp
src/app/FApp_AppImpl.cpp

index 8a8730a..a9d88e5 100644 (file)
@@ -860,7 +860,11 @@ _AppControlManager::LaunchAppImplicit(_AppArg* pArg, int req)
                }
 
                char pkgname[255] = {0, };
-               aul_app_get_pkgname_bypid(pid, pkgname, 255);
+               if (aul_app_get_pkgname_bypid(pid, pkgname, 255) != AUL_R_OK)
+               {
+                       SysLog(NID_APP, "Fail to get package name by pid : (%d).", pid);
+                       return E_SYSTEM;
+               }
 
                if (strncmp(pkgname, APP_SELECTOR, strlen(APP_SELECTOR)) != 0)
                {
index 5813241..85b7920 100644 (file)
@@ -1191,18 +1191,6 @@ _AppImpl::OnDataControlRequestReceived(const _AppArg& arg, RequestId reqId)
        return;
 
 CATCH:
-       if (r == E_SYSTEM)
-       {
-               pErrorMsg = new (std::nothrow) String("[E_SYSTEM] A system error has occurred.");
-       }
-       else if (r == E_OUT_OF_MEMORY)
-       {
-               pErrorMsg = new (std::nothrow) String("[E_OUT_OF_MEMORY] The memory was insufficient.");
-       }
-       SysTryReturnVoidResult(NID_APP, pErrorMsg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory was insufficient.");
-
-       res = DataControlProviderManager::GetInstance()->SendDataControlError(reqId, *pErrorMsg);
-
        if (pColumnList)
        {
                pColumnList->RemoveAll(true);
@@ -1221,6 +1209,18 @@ CATCH:
                delete pUpdateMap;
        }
 
+       if (r == E_SYSTEM)
+       {
+               pErrorMsg = new (std::nothrow) String("[E_SYSTEM] A system error has occurred.");
+       }
+       else if (r == E_OUT_OF_MEMORY)
+       {
+               pErrorMsg = new (std::nothrow) String("[E_OUT_OF_MEMORY] The memory was insufficient.");
+       }
+       SysTryReturnVoidResult(NID_APP, pErrorMsg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory was insufficient.");
+
+       res = DataControlProviderManager::GetInstance()->SendDataControlError(reqId, *pErrorMsg);
+
        delete pErrorMsg;
 
        return;