Fix making gvariant with pkgtype 11/103411/1
authorSangyoon Jang <s89.jang@samsung.com>
Thu, 8 Dec 2016 08:23:59 +0000 (17:23 +0900)
committerSangyoon Jang <s89.jang@samsung.com>
Thu, 8 Dec 2016 08:23:59 +0000 (17:23 +0900)
Change-Id: Ia0a788428da444dfc63a4fbf643bae53fd1c7ec3
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
client/src/pkgmgr.c

index f3d8ff5e5a128f64b93d9285bf154c43ff6513a2..feb8dd576e550a78f064889a1d02bda24ff808d4 100644 (file)
@@ -495,7 +495,8 @@ API int pkgmgr_client_usr_install(pkgmgr_client *pc, const char *pkg_type,
        g_variant_builder_unref(builder);
 
        ret = pkgmgr_client_connection_send_request(client, "install",
-                       g_variant_new("(uss@as)", uid, pkgtype, pkg_path, args),
+                       g_variant_new("(uss@as)", uid, pkgtype ? pkgtype : "",
+                               pkg_path, args),
                        &result);
        if (ret != PKGMGR_R_OK) {
                ERR("request failed: %d", ret);
@@ -651,7 +652,8 @@ API int pkgmgr_client_usr_mount_install(pkgmgr_client *pc, const char *pkg_type,
        g_variant_builder_unref(builder);
 
        ret = pkgmgr_client_connection_send_request(client, "mount_install",
-                       g_variant_new("(uss@as)", uid, pkgtype, pkg_path, args),
+                       g_variant_new("(uss@as)", uid, pkgtype ? pkgtype : "",
+                               pkg_path, args),
                        &result);
        if (ret != PKGMGR_R_OK) {
                ERR("request failed: %d", ret);