bundle *b = _request_get_bundle(req);
const char *alias_appid = bundle_get_val(b, AUL_K_ALIAS_APPID);
app_property_h prop = _app_property_find(target_uid);
+ int fd = _request_remove_fd(req);
const char *appid;
bundle *res;
- appid = _app_property_get_real_appid(prop, alias_appid);
- if (!appid) {
- _E("Failed to find real appid. alias_appid(%s)", alias_appid);
- _request_send_result(req, -EINVAL);
- return -1;
- }
-
res = bundle_create();
if (!res) {
_E("Out of memory");
- _request_send_result(req, -EIO);
+ aul_sock_send_raw_with_fd(fd, -EIO, NULL, 0, AUL_SOCK_NOREPLY);
return -1;
}
- bundle_add(res, AUL_K_APPID, appid);
- aul_sock_send_bundle_with_fd(_request_remove_fd(req),
- _request_get_cmd(req), res, AUL_SOCK_NOREPLY);
+ appid = _app_property_get_real_appid(prop, alias_appid);
+ if (!appid)
+ _W("Failed to find real appid. alias_appid(%s)", alias_appid);
+ else
+ bundle_add(res, AUL_K_APPID, appid);
+
+ aul_sock_send_bundle_with_fd(fd, _request_get_cmd(req), res,
+ AUL_SOCK_NOREPLY);
bundle_free(res);
_I("[APP_GET_APPID_BY_ALIAS_APPID] alias_appid(%s), appid(%s)",
alias_appid, appid);