Re: [PATCH] ofono: Add CDMA network when modem is registered

2013-04-03 Thread Patrik Flykt
On Thu, 2013-03-28 at 09:46 -0400, Forest Bond wrote:
 From: Forest Bond forest.b...@rapidrollout.com
 
 Connecting the network requires powering the CDMA connection manager,
 which fails with an error if network registration is not complete.  So
 we only add the network when registration is complete and remove it when
 the modem is no longer registered.

Applied, thanks!

Patrik
___
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman


Re: [PATCH 0/3] VPN domain name was ignored

2013-04-03 Thread Patrik Flykt
On Thu, 2013-03-28 at 14:55 +0200, Jukka Rissanen wrote:
 Hi,
 this patchset fixes this issue
 https://bugs.meego.com/show_bug.cgi?id=25994
 where VPN server pushed domain name is lost.
 
 This is similar to earlier VPN nameserver patch. The domain
 name that VPN server pushes to us was not handled properly.

Applied, thanks!

Patrik
___
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman


[PATCH] Allow ethernet provision by interface name

2013-04-03 Thread Simon Busch
Allowing provision by interface name can be helpful in some situations where
interface names never change. In all other situations where the interface name 
is very
likely to change the MAC should still be used as identifier for provisioning.
---
 doc/config-format.txt |2 ++
 src/config.c  |   27 +++
 2 files changed, 29 insertions(+)

diff --git a/doc/config-format.txt b/doc/config-format.txt
index c255177..ca98995 100644
--- a/doc/config-format.txt
+++ b/doc/config-format.txt
@@ -56,6 +56,8 @@ Allowed fields:
   interface is used. The byte values must have prefix 0 added,
   the bytes must be separated by : char and its length must be
   exactly 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1 + 2 = 17 characters.
+- Interface: Name of the interface to configure. If MAC is also set it must
+  be the MAC address of the specified interface.
 - Nameservers: Comma separated list of nameservers
 - SearchDomains: Comma separated list of DNS search domains
 - Timeservers: Comma separated list of timeservers
diff --git a/src/config.c b/src/config.c
index 05c654b..e94e835 100644
--- a/src/config.c
+++ b/src/config.c
@@ -66,6 +66,7 @@ struct connman_config_service {
char *ipv6_gateway;
char *ipv6_privacy;
char *mac;
+   char *interface;
char **nameservers;
char **search_domains;
char **timeservers;
@@ -108,6 +109,7 @@ static connman_bool_t cleanup = FALSE;
 #define SERVICE_KEY_IPv6   IPv6
 #define SERVICE_KEY_IPv6_PRIVACY   IPv6.Privacy
 #define SERVICE_KEY_MACMAC
+#define SERVICE_KEY_INTERFACE  Interface
 #define SERVICE_KEY_NAMESERVERSNameservers
 #define SERVICE_KEY_SEARCH_DOMAINS SearchDomains
 #define SERVICE_KEY_TIMESERVERSTimeservers
@@ -236,6 +238,7 @@ free_only:
g_free(config_service-ipv6_gateway);
g_free(config_service-ipv6_privacy);
g_free(config_service-mac);
+   g_free(config_service-interface);
g_strfreev(config_service-nameservers);
g_strfreev(config_service-search_domains);
g_strfreev(config_service-timeservers);
@@ -485,6 +488,12 @@ static connman_bool_t load_service_generic(GKeyFile 
*keyfile,
service-mac = str;
}
 
+   str = g_key_file_get_string(keyfile, group, SERVICE_KEY_INTERFACE, 
NULL);
+   if (str != NULL) {
+   g_free(service-interface);
+   service-interface = str;
+   }
+
str = g_key_file_get_string(keyfile, group, SERVICE_KEY_DOMAIN, NULL);
if (str != NULL) {
g_free(service-domain_name);
@@ -1106,6 +1115,24 @@ static void provision_service(gpointer key, gpointer 
value,
return;
}
 
+   if (config-interface != NULL) {
+   struct connman_device *device;
+   const char *device_interface;
+
+   device = connman_network_get_device(network);
+   if (device == NULL) {
+   connman_error(Network device is missing);
+   return;
+   }
+
+   device_interface = connman_device_get_string(device, 
Interface);
+
+   DBG(wants %s has %s, config-interface, device_interface);
+
+   if (g_ascii_strcasecmp(device_interface, config-interface) != 
0)
+   return;
+   }
+
if (g_strcmp0(config-type, wifi) == 0 
type == CONNMAN_SERVICE_TYPE_WIFI) {
ssid = connman_network_get_blob(network, WiFi.SSID,
-- 
1.7.10.4

___
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman