summaryrefslogtreecommitdiffstats
path: root/src/realmd
diff options
context:
space:
mode:
authorTomas Smetana <tsmetana@redhat.com>2013-12-12 10:03:01 +0100
committerTomas Smetana <tsmetana@redhat.com>2013-12-12 10:03:01 +0100
commit4df5453c8715f25e367090fdd5ce7de7fa996340 (patch)
tree9f8b4ae7b77cb855f2b83235b361f6653f51f024 /src/realmd
parente99df5fdba9bb16dfec1e1a80f001fe97622e71b (diff)
downloadopenlmi-providers-4df5453c8715f25e367090fdd5ce7de7fa996340.tar.gz
openlmi-providers-4df5453c8715f25e367090fdd5ce7de7fa996340.tar.xz
openlmi-providers-4df5453c8715f25e367090fdd5ce7de7fa996340.zip
Realmd: increase the D-Bus messages timeout
This patch increases the timeout for all the D-Bus message send calls to DBUS_TIMEOUT_INFINITE. This means we wait for Realmd to finish the join/leave operations: it is hard to predict how long can those take and the default D-Bus timeout may not be enough. When the enrollment takes more than what's the D-Bus default timeout, the provider reports (false) failure even when the oprations succeeds.
Diffstat (limited to 'src/realmd')
-rw-r--r--src/realmd/rdcp_dbus.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/realmd/rdcp_dbus.c b/src/realmd/rdcp_dbus.c
index 3df6803..490db3d 100644
--- a/src/realmd/rdcp_dbus.c
+++ b/src/realmd/rdcp_dbus.c
@@ -1228,7 +1228,8 @@ get_dbus_string_property(DBusConnection *bus, const char *object_path,
return FALSE;
}
- if ((reply = dbus_connection_send_with_reply_and_block(bus, msg, -1, &dbus_error)) == NULL) {
+ if ((reply = dbus_connection_send_with_reply_and_block(bus, msg,
+ DBUS_TIMEOUT_INFINITE, &dbus_error)) == NULL) {
dbus_message_unref(msg);
RETURN_DBUS_ERROR(g_error, dbus_error);
}
@@ -1327,7 +1328,8 @@ get_dbus_properties(DBusConnection *bus, const char *object_path,
return FALSE;
}
- if ((reply = dbus_connection_send_with_reply_and_block(bus, msg, -1, &dbus_error)) == NULL) {
+ if ((reply = dbus_connection_send_with_reply_and_block(bus, msg,
+ DBUS_TIMEOUT_INFINITE, &dbus_error)) == NULL) {
dbus_message_unref(msg);
RETURN_DBUS_ERROR(g_error, dbus_error);
}
@@ -1474,7 +1476,8 @@ dbus_discover_call(DBusConnection *bus, const char *target, GVariant *options,
RETURN_DBUS_ERROR(g_error, dbus_error);
}
- if ((reply = dbus_connection_send_with_reply_and_block(bus, msg, -1, &dbus_error)) == NULL) {
+ if ((reply = dbus_connection_send_with_reply_and_block(bus, msg,
+ DBUS_TIMEOUT_INFINITE, &dbus_error)) == NULL) {
dbus_message_unref(msg);
RETURN_DBUS_ERROR(g_error, dbus_error);
}
@@ -1626,7 +1629,8 @@ dbus_change_login_policy_call(DBusConnection *bus, const gchar *dbus_path, const
RETURN_DBUS_ERROR(g_error, dbus_error);
}
- if ((reply = dbus_connection_send_with_reply_and_block(bus, msg, -1, &dbus_error)) == NULL) {
+ if ((reply = dbus_connection_send_with_reply_and_block(bus, msg,
+ DBUS_TIMEOUT_INFINITE, &dbus_error)) == NULL) {
dbus_message_unref(msg);
RETURN_DBUS_ERROR(g_error, dbus_error);
}
@@ -1764,7 +1768,8 @@ dbus_join_leave_call(const char *method, DBusConnection *bus, const gchar *dbus_
RETURN_DBUS_ERROR(g_error, dbus_error);
}
- if ((reply = dbus_connection_send_with_reply_and_block(bus, msg, -1, &dbus_error)) == NULL) {
+ if ((reply = dbus_connection_send_with_reply_and_block(bus, msg,
+ DBUS_TIMEOUT_INFINITE, &dbus_error)) == NULL) {
dbus_message_unref(msg);
RETURN_DBUS_ERROR(g_error, dbus_error);
}