Change move function to return req_key for signal 22/73622/2
authorJunghyun Yeon <jungh.yeon@samsung.com>
Thu, 9 Jun 2016 02:23:31 +0000 (11:23 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Thu, 9 Jun 2016 02:31:54 +0000 (11:31 +0900)
changed should be applied with slp-pkgmgr
https://review.tizen.org/gerrit/#/c/73621/

Change-Id: I2972c3aef5168773aa3bf329566dbe313f717a6f
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
src/request.c

index 58987d9..c59a550 100644 (file)
@@ -53,6 +53,7 @@ static const char instropection_xml[] =
        "      <arg type='s' name='pkgid' direction='in'/>"
        "      <arg type='i' name='movetype' direction='in'/>"
        "      <arg type='i' name='ret' direction='out'/>"
+       "      <arg type='s' name='reqkey' direction='out'/>"
        "    </method>"
        "    <method name='enable_pkg'>"
        "      <arg type='u' name='uid' direction='in'/>"
@@ -495,7 +496,7 @@ static int __handle_request_move(uid_t uid,
        g_variant_get(parameters, "(u&s&si)", &target_uid, &pkgtype, &pkgid, &move_type);
        if (target_uid == (uid_t)-1 || pkgtype == NULL || pkgid == NULL) {
                g_dbus_method_invocation_return_value(invocation,
-                               g_variant_new("(i)", PKGMGR_R_ECOMM));
+                               g_variant_new("(is)", PKGMGR_R_ECOMM, ""));
                return -1;
        }
 
@@ -507,13 +508,13 @@ static int __handle_request_move(uid_t uid,
        if (_pm_queue_push(target_uid, reqkey, PKGMGR_REQUEST_TYPE_MOVE, pkgtype,
                                pkgid, buf)) {
                g_dbus_method_invocation_return_value(invocation,
-                               g_variant_new("(i)", PKGMGR_R_ESYSTEM));
+                               g_variant_new("(is)", PKGMGR_R_ESYSTEM, ""));
                free(reqkey);
                return -1;
        }
 
        g_dbus_method_invocation_return_value(invocation,
-                       g_variant_new("(i)", PKGMGR_R_OK));
+                       g_variant_new("(is)", PKGMGR_R_OK, reqkey));
        free(reqkey);
 
        return 0;