summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorilho kim <ilho159.kim@samsung.com>2024-04-02 06:54:50 +0000
committerilho kim <ilho159.kim@samsung.com>2024-04-02 07:03:05 +0000
commit7e24fab698956d06746e4d30fa8c7987be1f6776 (patch)
tree8071d1c52666dd10eb0c1c60d397297be8743c94
parent7b6707e47fe51ba4236b9f71fed7a3374c137e00 (diff)
downloadslp-pkgmgr-7e24fab698956d06746e4d30fa8c7987be1f6776.tar.gz
slp-pkgmgr-7e24fab698956d06746e4d30fa8c7987be1f6776.tar.bz2
slp-pkgmgr-7e24fab698956d06746e4d30fa8c7987be1f6776.zip
Revert "Fix pkgmgr_client_usr_clear_cache_dir"
This reverts commit 08ecb360d99c083b819d6be8d060b4e15435e1eb. Change-Id: Ib4a6c56878aaed9df17d7f5fb5eab38b345b3c2f
-rw-r--r--client/src/api_stub.cc17
1 files changed, 1 insertions, 16 deletions
diff --git a/client/src/api_stub.cc b/client/src/api_stub.cc
index bff1a7a..04eb2c0 100644
--- a/client/src/api_stub.cc
+++ b/client/src/api_stub.cc
@@ -1579,22 +1579,7 @@ API int pkgmgr_client_usr_clear_cache_dir(const char *pkgid, uid_t uid) {
return PKGMGR_R_EINVAL;
}
- pkgmgr_client_t* raw_pc =
- static_cast<pkgmgr_client_t*>(calloc(1, sizeof(pkgmgr_client_t)));
- if (raw_pc == nullptr) {
- _E("out of memory");
- return PKGMGR_R_ENOMEM;
- }
-
- raw_pc->pc_type = PC_REQUEST;
-
- if (pkgmgr_client_connection_connect(raw_pc) != PKGMGR_R_OK) {
- _E("pkgmgr_client_connection_connect fail");
- free(raw_pc);
- return PKGMGR_R_ECOMM;
- }
-
- auto* con = new Connector(PC_REQUEST, raw_pc);
+ auto* con = new Connector(PC_REQUEST);
auto* proxy = con->GetCacheProxy();
if (proxy == nullptr)
return PKGMGR_R_EIO;