summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKalev Lember <klember@redhat.com>2019-06-28 18:10:36 +0200
committerKalev Lember <klember@redhat.com>2019-06-28 18:13:27 +0200
commit298355d8b3d5a85b99e74a06e936a0113797bf2a (patch)
tree45bd4f92a56fb9bcee12907053da7da69a7a2e9c
parentca35861a54b9f9413e4db8486a2786ba771a0271 (diff)
downloadgnome-settings-daemon-wip/hughsie/subman.tar.gz
subman: Increase RHSM dbus call timeoutswip/hughsie/subman
Increase the dbus timeouts to 5 minutes as the register/unregister calls seem to routinely take more than a minute.
-rw-r--r--plugins/subman/gsd-subman-helper.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/plugins/subman/gsd-subman-helper.c b/plugins/subman/gsd-subman-helper.c
index 182f7190..af7a82e9 100644
--- a/plugins/subman/gsd-subman-helper.c
+++ b/plugins/subman/gsd-subman-helper.c
@@ -28,6 +28,8 @@
#include <gio/gio.h>
#include <json-glib/json-glib.h>
+#define DBUS_TIMEOUT 300000 /* 5 minutes */
+
static void
_helper_convert_error (const gchar *json_txt, GError **error)
{
@@ -94,7 +96,8 @@ _helper_unregister (GError **error)
proxy_options,
""), /* lang */
G_DBUS_CALL_FLAGS_NONE,
- -1, NULL, error);
+ DBUS_TIMEOUT,
+ NULL, error);
return res != NULL;
}
@@ -127,7 +130,8 @@ _helper_auto_attach (GError **error)
proxy_options,
""), /* lang */
G_DBUS_CALL_FLAGS_NONE,
- -1, NULL, error);
+ DBUS_TIMEOUT,
+ NULL, error);
if (res == NULL)
return FALSE;
g_variant_get (res, "(&s)", &str);
@@ -158,7 +162,8 @@ _helper_save_config (const gchar *key, const gchar *value, GError **error)
g_variant_new_string (value),
""), /* lang */
G_DBUS_CALL_FLAGS_NONE,
- -1, NULL, error);
+ DBUS_TIMEOUT,
+ NULL, error);
return res != NULL;
}
@@ -305,7 +310,8 @@ main (int argc, char *argv[])
subman_conopts,
userlang),
G_DBUS_CALL_FLAGS_NO_AUTO_START,
- -1, NULL, &error_local);
+ DBUS_TIMEOUT,
+ NULL, &error_local);
if (res == NULL) {
g_dbus_error_strip_remote_error (error_local);
_helper_convert_error (error_local->message, &error);
@@ -339,7 +345,8 @@ main (int argc, char *argv[])
subman_conopts,
userlang),
G_DBUS_CALL_FLAGS_NO_AUTO_START,
- -1, NULL, &error_local);
+ DBUS_TIMEOUT,
+ NULL, &error_local);
if (res == NULL) {
g_dbus_error_strip_remote_error (error_local);
_helper_convert_error (error_local->message, &error);