- result = g_dbus_proxy_call_sync(proxy, "Request", g_variant_new("(sisssi)", req_id, req_type, pkg_type, pkgid, args, uid),
- G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
- if (result == NULL) {
- ERR("failed to call %s", error->message);
- g_error_free(error);
+ do {
+ proxy = g_dbus_proxy_new_sync(cc->conn, G_DBUS_PROXY_FLAGS_NONE, NULL,
+ COMM_PKGMGR_DBUS_SERVICE, COMM_PKGMGR_DBUS_OBJECT_PATH,
+ COMM_PKGMGR_DBUS_INTERFACE, NULL, &error);
+ if (proxy == NULL) {
+ ERR("failed to get proxy object, sleep and retry[%s]", error->message);
+ g_error_free(error);
+ error = NULL;
+ usleep(COMM_CLIENT_WAIT_USEC);
+ retry_cnt++;
+ continue;
+ }
+
+ result = g_dbus_proxy_call_sync(proxy, "Request", g_variant_new("(sisssi)", req_id, req_type, pkg_type, pkgid, args, uid),
+ G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);