From: Sangyoon Jang Date: Wed, 13 Feb 2019 04:59:45 +0000 (+0900) Subject: Set each gdbus method call timeout as 5 seconds X-Git-Tag: submit/tizen_5.0/20190213.074251~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fa5733b75417d87b0c42083414f650b4759cee7a;p=platform%2Fcore%2Fappfw%2Fslp-pkgmgr.git Set each gdbus method call timeout as 5 seconds The default timeout was 25 seconds, this is too long. Now pkgmgr client API will have timeout as 25 seconds as maximum. (5 sec * 5 times) Change-Id: I4462181d067f44a26b3028e24dc9b3f412b7eaaa Signed-off-by: Sangyoon Jang --- diff --git a/client/src/pkgmgr_client_connection.c b/client/src/pkgmgr_client_connection.c index 6e1f2f2..914ccda 100644 --- a/client/src/pkgmgr_client_connection.c +++ b/client/src/pkgmgr_client_connection.c @@ -31,6 +31,7 @@ #define CONNECTION_RETRY_MAX 5 #define CONNECTION_WAIT_USEC (1000000 / 2) /* 0.5 sec */ +#define CONNECTION_TIMEOUT_MSEC 5000 /* 5 sec */ #define REGULAR_USER 5000 static int _is_system_user(void) @@ -280,7 +281,8 @@ int pkgmgr_client_connection_send_request(struct pkgmgr_client_t *pc, } r = g_dbus_proxy_call_sync(proxy, method, params, - G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error); + G_DBUS_CALL_FLAGS_NONE, + CONNECTION_TIMEOUT_MSEC, NULL, &error); g_object_unref(proxy); if (error && error->code == G_DBUS_ERROR_ACCESS_DENIED) { ERR("failed to send request, privilege denied[%s]",