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).
This commit is contained in:
Aleksander Morgado
2012-03-15 14:15:06 +01:00
parent dc1df5bf2f
commit 7fdd08c02e
2 changed files with 11 additions and 0 deletions
@@ -219,6 +219,13 @@
-->
<property name="Ip6Config" type="a{sv}" access="read" />
<!--
IpTimeout:
Maximum time to wait for a successful IP establishment, when PPP is used.
-->
<property name="IpTimeout" type="u" access="read" />
<!--
Properties:
+4
View File
@@ -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),