aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-02-16 16:43:08 +0100
committerAleksander Morgado <aleksander@lanedo.com>2012-03-15 14:15:06 +0100
commit7fdd08c02ea676df7407a1045b39fe23d80eabe1 (patch)
tree0ba160d559d2222989dd623df3ffe291525d6d4e /src
parentdc1df5bf2fb00b9eda0e98f59bb783c895fdeebf (diff)
api,dbus: new `IpTimeout' property in the Bearer interface
This IpTimeout property will be read by NetworkManager, and used as the time to wait for pppd to establish the IP configuration (20s by default).
Diffstat (limited to 'src')
-rw-r--r--src/mm-bearer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mm-bearer.c b/src/mm-bearer.c
index 5506d2c7..b14f4789 100644
--- a/src/mm-bearer.c
+++ b/src/mm-bearer.c
@@ -34,6 +34,9 @@
#include "mm-log.h"
#include "mm-modem-helpers.h"
+/* We require up to 20s to get a proper IP when using PPP */
+#define MM_BEARER_IP_TIMEOUT_DEFAULT 20
+
G_DEFINE_TYPE (MMBearer, mm_bearer, MM_GDBUS_TYPE_BEARER_SKELETON);
enum {
@@ -650,6 +653,7 @@ mm_bearer_init (MMBearer *self)
mm_gdbus_bearer_set_connected (MM_GDBUS_BEARER (self), FALSE);
mm_gdbus_bearer_set_suspended (MM_GDBUS_BEARER (self), FALSE);
mm_gdbus_bearer_set_properties (MM_GDBUS_BEARER (self), NULL);
+ mm_gdbus_bearer_set_ip_timeout (MM_GDBUS_BEARER (self), MM_BEARER_IP_TIMEOUT_DEFAULT);
mm_gdbus_bearer_set_ip4_config (MM_GDBUS_BEARER (self),
mm_common_bearer_ip_config_get_dictionary (NULL));
mm_gdbus_bearer_set_ip6_config (MM_GDBUS_BEARER (self),