GVariantBuilder *builder = NULL;
GVariant *args = NULL;
struct pkgmgr_client_t *client = (struct pkgmgr_client_t *)pc;
- char *pkgtype = NULL;
struct cb_info *cb_info;
if (pc == NULL || pkg_path == NULL) {
return PKGMGR_R_EINVAL;
}
- if (pkg_type)
- pkgtype = strdup(pkg_type);
-
/* build arguments */
builder = g_variant_builder_new(G_VARIANT_TYPE("as"));
if (client->tep_path) {
g_variant_builder_unref(builder);
ret = pkgmgr_client_connection_send_request(client, "install",
- g_variant_new("(uss@as)", uid, pkgtype ? pkgtype : "",
+ g_variant_new("(uss@as)", uid, pkg_type ? pkg_type : "",
pkg_path, args),
&result);
if (ret != PKGMGR_R_OK) {
GVariantBuilder *builder = NULL;
GVariant *args = NULL;
struct pkgmgr_client_t *client = (struct pkgmgr_client_t *)pc;
- char *pkgtype = NULL;
struct cb_info *cb_info;
if (pc == NULL || pkg_path == NULL) {
return PKGMGR_R_EINVAL;
}
- if (pkg_type)
- pkgtype = strdup(pkg_type);
-
/* build arguments */
builder = g_variant_builder_new(G_VARIANT_TYPE("as"));
if (client->tep_path) {
g_variant_builder_unref(builder);
ret = pkgmgr_client_connection_send_request(client, "mount_install",
- g_variant_new("(uss@as)", uid, pkgtype ? pkgtype : "",
+ g_variant_new("(uss@as)", uid, pkg_type ? pkg_type : "",
pkg_path, args),
&result);
if (ret != PKGMGR_R_OK) {