aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2011-08-19 08:56:54 +0200
committerGuido Günther <agx@sigxcpu.org>2011-08-19 08:56:54 +0200
commit8b35c7402bbe003e9da37773d3ef5ceb06e8ae04 (patch)
tree0572101cec5157efe947592419f5e96b4201583d /src
parent04ae3ade85928efd5513e138a7cedcaaeb675e4c (diff)
Use a consistent timeout for MM DBus calls
Diffstat (limited to 'src')
-rw-r--r--src/ppm/modemproxy.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ppm/modemproxy.py b/src/ppm/modemproxy.py
index fa06dd5..ca5fcf7 100644
--- a/src/ppm/modemproxy.py
+++ b/src/ppm/modemproxy.py
@@ -47,6 +47,7 @@ class ModemManagerProxy(GObject.GObject):
MM_DBUS_INTERFACE_MODEM='org.freedesktop.ModemManager.Modem'
MM_DBUS_INTERFACE_MODEM_GSM_CARD='org.freedesktop.ModemManager.Modem.Gsm.Card'
MM_DBUS_INTERFACE_MODEM_GSM_USSD='org.freedesktop.ModemManager.Modem.Gsm.Ussd'
+ MM_DBUS_TIMEOUT = 5000
__gsignals__ = {
# Emitted when we got the new account balance from the provider
@@ -153,7 +154,7 @@ class ModemManagerProxy(GObject.GObject):
self.MM_DBUS_INTERFACE_MODEM_GSM_USSD,
None)
ussd.call("Initiate", GLib.Variant('(s)', (command,)),
- Gio.DBusCallFlags.NO_AUTO_START, 5000, None,
+ Gio.DBusCallFlags.NO_AUTO_START, self.MM_DBUS_TIMEOUT, None,
self.handle_dbus_reply, None)
@mm_request
@@ -166,7 +167,7 @@ class ModemManagerProxy(GObject.GObject):
self.MM_DBUS_INTERFACE_MODEM,
None)
ussd.call("Enable", GLib.Variant('(b)', (enable,)),
- Gio.DBusCallFlags.NO_AUTO_START, 1000, None,
+ Gio.DBusCallFlags.NO_AUTO_START, self.MM_DBUS_TIMEOUT, None,
self.handle_dbus_reply, None)
def modem_enable(self, reply_func=None, error_func=None):