summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfujiwarat <takao.fujiwara1@gmail.com>2015-01-06 11:59:05 +0900
committerfujiwarat <takao.fujiwara1@gmail.com>2015-01-06 11:59:05 +0900
commit1b668f667eaef08dfbbbdf04a0865ea086f4250a (patch)
tree0381e01f9f4dbf9ee75b1118e9c0d652695b2cf0
parent576ebc3633aa1fb3076ffac031255c3da4e2cd09 (diff)
downloadibus-1b668f667eaef08dfbbbdf04a0865ea086f4250a.tar.gz
Increase dbus timeout to 15 seconds
When log into XFCE session, ibus panel sometimes fails to run the primary ibus engine due to 5 seconds of the timeout. It could happen when I open gnome-terminal during launching ibus-daemon. TEST=bus/ibus-daemon, ui/gtk3/ibus-ui-gtk3 Review URL: https://codereview.appspot.com/192940043
-rw-r--r--bus/global.c2
-rw-r--r--bus/ibusimpl.c5
-rw-r--r--bus/main.c2
-rw-r--r--src/ibusshare.c5
4 files changed, 8 insertions, 6 deletions
diff --git a/bus/global.c b/bus/global.c
index 24677b5b..f147cd6f 100644
--- a/bus/global.c
+++ b/bus/global.c
@@ -28,4 +28,4 @@ gchar *g_address = "unix:tmpdir=/tmp";
gchar *g_cache = "auto";
gboolean g_mempro = FALSE;
gboolean g_verbose = FALSE;
-gint g_gdbus_timeout = 5000;
+gint g_gdbus_timeout = 15000;
diff --git a/bus/ibusimpl.c b/bus/ibusimpl.c
index 61f66490..f99307ad 100644
--- a/bus/ibusimpl.c
+++ b/bus/ibusimpl.c
@@ -1396,11 +1396,12 @@ _ibus_set_global_engine_ready_cb (BusInputContext *context,
GError *error = NULL;
if (!bus_input_context_set_engine_by_desc_finish (context, res, &error)) {
- g_error_free (error);
g_dbus_method_invocation_return_error (data->invocation,
G_DBUS_ERROR,
G_DBUS_ERROR_FAILED,
- "Set global engine failed.");
+ "Set global engine failed: %s",
+ error->message);
+ g_error_free (error);
}
else {
g_dbus_method_invocation_return_value (data->invocation, NULL);
diff --git a/bus/main.c b/bus/main.c
index 056826e4..6ad60179 100644
--- a/bus/main.c
+++ b/bus/main.c
@@ -64,7 +64,7 @@ static const GOptionEntry entries[] =
{ "address", 'a', 0, G_OPTION_ARG_STRING, &g_address, "specify the address of ibus daemon.", "address" },
{ "replace", 'r', 0, G_OPTION_ARG_NONE, &replace, "if there is an old ibus-daemon is running, it will be replaced.", NULL },
{ "cache", 't', 0, G_OPTION_ARG_STRING, &g_cache, "specify the cache mode. [auto/refresh/none]", NULL },
- { "timeout", 'o', 0, G_OPTION_ARG_INT, &g_gdbus_timeout, "gdbus reply timeout in milliseconds. pass -1 to use the default timeout of gdbus.", "timeout [default is 5000]" },
+ { "timeout", 'o', 0, G_OPTION_ARG_INT, &g_gdbus_timeout, "gdbus reply timeout in milliseconds. pass -1 to use the default timeout of gdbus.", "timeout [default is 15000]" },
{ "mem-profile", 'm', 0, G_OPTION_ARG_NONE, &g_mempro, "enable memory profile, send SIGUSR2 to print out the memory profile.", NULL },
{ "restart", 'R', 0, G_OPTION_ARG_NONE, &restart, "restart panel and config processes when they die.", NULL },
{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &g_verbose, "verbose.", NULL },
diff --git a/src/ibusshare.c b/src/ibusshare.c
index c4a72441..63800a60 100644
--- a/src/ibusshare.c
+++ b/src/ibusshare.c
@@ -158,8 +158,9 @@ ibus_get_socket_path (void)
gint
ibus_get_timeout (void)
{
- /* 6000 ms is the default timeout on the ibus-daemon side (5 sec) plus 1. */
- static const gint default_timeout = 6000;
+ /* 16000 ms is the default timeout on the ibus-daemon side
+ * (15 sec) plus 1. */
+ static const gint default_timeout = 16000;
static gint64 timeout = -2;
if (timeout == -2) {