Change timeout of engine reply
authorPeng Huang <shawn.p.huang@gmail.com>
Fri, 28 Aug 2009 22:39:03 +0000 (06:39 +0800)
committerPeng Huang <shawn.p.huang@gmail.com>
Fri, 28 Aug 2009 22:39:03 +0000 (06:39 +0800)
bus/engineproxy.c
bus/factoryproxy.c

index 2dd22c632bcdc6afd8e3896765b2bb58452f7313..a16cabfccd0e5293e219b8c76a941e8a859ef7be 100644 (file)
@@ -23,6 +23,8 @@
 #include "ibusimpl.h"
 #include "engineproxy.h"
 
+#define PROCESS_KEY_EVENT_TIMEOUT (10000)
+
 enum {
     COMMIT_TEXT,
     FORWARD_KEY_EVENT,
@@ -590,7 +592,7 @@ bus_engine_proxy_process_key_event (BusEngineProxy *engine,
     retval = ibus_proxy_call_with_reply ((IBusProxy *) engine,
                                          "ProcessKeyEvent",
                                          &pending,
-                                         -1,
+                                         PROCESS_KEY_EVENT_TIMEOUT,
                                          &error,
                                          G_TYPE_UINT, &keyval,
                                          G_TYPE_UINT, &keycode,
index 521d60985664382cbdded203e2ebff3a5f6e7330..373999e62c994322764153fe1e24017a8e27e0c7 100644 (file)
@@ -23,6 +23,8 @@
 #include "dbusimpl.h"
 #include "factoryproxy.h"
 
+#define REPLY_TIMEOUT (-1)
+
 /* functions prototype */
 static void      bus_factory_proxy_class_init   (BusFactoryProxyClass   *klass);
 static void      bus_factory_proxy_init         (BusFactoryProxy        *factory);
@@ -186,7 +188,7 @@ bus_factory_proxy_create_engine (BusFactoryProxy *factory,
     retval = ibus_proxy_call_with_reply ((IBusProxy *) factory,
                                          "CreateEngine",
                                          &pending,
-                                         -1,
+                                         REPLY_TIMEOUT,
                                          &error,
                                          G_TYPE_STRING, &(desc->name),
                                          G_TYPE_INVALID);