neard: Use a timeout instead of DBUS_TIMEOUT_USE_DEFAULT for compatibility
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Wed, 27 Feb 2013 09:17:40 +0000 (11:17 +0200)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Wed, 27 Feb 2013 11:36:50 +0000 (13:36 +0200)
DBUS_TIMEOUT_USE_DEFAULT appeared in dbus-1.4.12, but earlier dbus versions
are still in use in some distributions like Fedora 17.

plugins/neard.c

index 145ab9e..85cf06b 100644 (file)
@@ -39,6 +39,8 @@
 
 #include <gdbus.h>
 
+#define TIMEOUT 30000
+
 #define NEARD_SERVICE "org.neard"
 #define NEARD_PATH "/"
 #define NEARD_MANAGER_INTERFACE "org.neard.Manager"
@@ -528,7 +530,7 @@ static void register_agent(void)
                        &path, DBUS_TYPE_STRING, &type, DBUS_TYPE_INVALID);
 
        if (dbus_connection_send_with_reply(connection, message,
-                       &register_call, DBUS_TIMEOUT_USE_DEFAULT) == FALSE) {
+                                       &register_call, TIMEOUT) == FALSE) {
                dbus_message_unref(message);
                goto out;
        }