modem-manager: wait up to 120s for the connection result

We will very likely get the result of the connection attempt before the 2 mins,
either successful or error, but still we need to explicitly ask to keep the
DBus call open enough time.

This time should be enough to handle both the connection time (usually around
60s max), plus the time needed to register in the network and all the other
Simple.Connect() steps.
This commit is contained in:
Aleksander Morgado 2013-04-09 19:09:54 +02:00 committed by Dan Williams
parent f1ec2aa320
commit 82f8451c10

View file

@ -57,6 +57,9 @@ enum {
#define MODEM_CAPS_3GPP2(caps) (caps & (MM_MODEM_CAPABILITY_CDMA_EVDO))
/* Maximum time to keep the DBus call waiting for a connection result */
#define MODEM_CONNECT_TIMEOUT_SECS 120
/*****************************************************************************/
#define NM_MODEM_BROADBAND_ERROR (nm_modem_broadband_error_quark ())
@ -360,6 +363,7 @@ act_stage1_prepare (NMModem *_self,
if (!self->priv->simple_iface)
self->priv->simple_iface = mm_object_get_modem_simple (self->priv->modem_object);
g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (self->priv->simple_iface), MODEM_CONNECT_TIMEOUT_SECS * 1000);
mm_modem_simple_connect (self->priv->simple_iface,
self->priv->connect_properties,
NULL,