[meego-commits] 6382: Changes to Trunk:Testing/connman

Martin Xu martin.xu at intel.com
Tue Aug 10 05:39:12 UTC 2010


Hi,
I have made the following changes to connman in project Trunk:Testing. Please review and accept ASAP.

Thank You,
Martin Xu 

[This message was auto-generated]

---

Request #6382:

  submit:   home:martin:branches:Trunk:Testing/connman(r2)(cleanup) -> Trunk:Testing/connman


Message:
    upgrade to 0.54.4

State:   new          2010-08-09T17:30:47 martin
Comment: None



changes files:
--------------
--- connman.changes
+++ connman.changes
@@ -0,0 +1,7 @@
+* Mon Aug 09 2010 Martin Xu <martin.xu at intel.com> - 0.54.4
+- upgrade to 0.54.4
+- to fix bug BMC #5024
+- to fix bug BMC #3398
+- to fix bug BMC #3719
+- to fix bug BMC #2640
+

old:
----
  connman-0.54.3.tar.bz2

new:
----
  connman-0.54.4.tar.bz2

spec files:
-----------
--- connman.spec
+++ connman.spec
@@ -7,7 +7,7 @@
 
 Name:       connman
 Summary:    Connection Manager
-Version:    0.54.3
+Version:    0.54.4
 Release:    1
 Group:      System/Networking
 License:    GPLv2

other changes:
--------------

++++++ connman-0.54.3.tar.bz2 -> connman-0.54.4.tar.bz2
--- ChangeLog
+++ ChangeLog
@@ -1,7 +1,18 @@
+ver 0.54.4
+	Always create a default profile (Fixes BMC #5024)
+	Disable offline devices upon device_set_connected(TRUE) calls
+	Set powered_pending from device_set_powered (Fixes BMC #3398)
+	Forward device_enable() error from enable_technolgy()
+	Do not try to enable a device if it's rfkill blocked (Fixes BMC #3719)
+	Toggle the powered_pending device flag if op succeeds (Fixes BMC #2640)
+	Use __connman_device_[enable|disable] from set_powered
+	Toggle offline mode only if device enablement succeeds
+	Disable offline mode when enabling a technology from offline mode
+
 ver 0.54.3
-	Fix html fetching error when recv returns 0
-	Fix wrong adapter_watch PATH
- 
+	Return html fetching error when recv returns 0 (Fixes BCM #3697)
+	Fix PATH of adapter_watch in bluetooth plugin (Fixes BCM #3897)
+
 ver 0.54.2
 	Fix SEGV at first startup
 	Fix connman_wifi_load_ssid
--- configure
+++ configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.64 for connman 0.54.3.
+# Generated by GNU Autoconf 2.64 for connman 0.54.4.
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
@@ -695,8 +695,8 @@
 # Identity of this package.
 PACKAGE_NAME='connman'
 PACKAGE_TARNAME='connman'
-PACKAGE_VERSION='0.54.3'
-PACKAGE_STRING='connman 0.54.3'
+PACKAGE_VERSION='0.54.4'
+PACKAGE_STRING='connman 0.54.4'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1583,7 +1583,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures connman 0.54.3 to adapt to many kinds of systems.
+\`configure' configures connman 0.54.4 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1653,7 +1653,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of connman 0.54.3:";;
+     short | recursive ) echo "Configuration of connman 0.54.4:";;
    esac
   cat <<\_ACEOF
 
@@ -1821,7 +1821,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-connman configure 0.54.3
+connman configure 0.54.4
 generated by GNU Autoconf 2.64
 
 Copyright (C) 2009 Free Software Foundation, Inc.
@@ -2279,7 +2279,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by connman $as_me 0.54.3, which was
+It was created by connman $as_me 0.54.4, which was
 generated by GNU Autoconf 2.64.  Invocation command line was
 
   $ $0 $@
@@ -3088,7 +3088,7 @@
 
 # Define the identity of the package.
  PACKAGE='connman'
- VERSION='0.54.3'
+ VERSION='0.54.4'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -13867,7 +13867,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by connman $as_me 0.54.3, which was
+This file was extended by connman $as_me 0.54.4, which was
 generated by GNU Autoconf 2.64.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -13931,7 +13931,7 @@
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
-connman config.status 0.54.3
+connman config.status 0.54.4
 configured by $0, generated by GNU Autoconf 2.64,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
--- configure.ac
+++ configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ(2.60)
-AC_INIT(connman, 0.54.3)
+AC_INIT(connman, 0.54.4)
 
 AM_INIT_AUTOMAKE([foreign subdir-objects])
 AM_CONFIG_HEADER(config.h)
--- src/connman.h
+++ src/connman.h
@@ -366,7 +366,7 @@
 void __connman_profile_cleanup(void);
 
 connman_bool_t __connman_profile_get_offlinemode(void);
-int __connman_profile_set_offlinemode(connman_bool_t offlinemode);
+int __connman_profile_set_offlinemode(connman_bool_t offlinemode, connman_bool_t all_devices);
 int __connman_profile_save_default(void);
 
 void __connman_profile_list(DBusMessageIter *iter, void *user_data);
--- src/device.c
+++ src/device.c
@@ -194,53 +194,80 @@
 					DBUS_TYPE_BOOLEAN, &device->powered);
 }
 
-static int set_powered(struct connman_device *device, connman_bool_t powered)
+int __connman_device_enable(struct connman_device *device)
 {
-	struct connman_device_driver *driver = device->driver;
 	int err;
 
-	DBG("device %p powered %d", device, powered);
+	DBG("device %p", device);
 
-	if (device->powered_pending == powered)
+	if (!device->driver || !device->driver->enable)
+		return -EOPNOTSUPP;
+
+	if (device->powered_pending == TRUE)
 		return -EALREADY;
 
-	if (!driver)
-		return -EINVAL;
+	if (device->blocked == TRUE)
+		return -ENOLINK;
 
-	if (powered == TRUE) {
-		if (driver->enable) {
-			device->powered_pending = powered;
-
-			err = driver->enable(device);
-			if (err == 0)
-				__connman_technology_enable_device(device);
-		} else
-			err = -EINVAL;
-	} else {
-		device->powered_pending = powered;
+	err = device->driver->enable(device);
+	if (err < 0) {
+		if (err == -EINPROGRESS)
+			device->powered_pending = TRUE;
+		return err;
+	}
 
-		device->reconnect = FALSE;
+	device->powered_pending = TRUE;
+	device->powered = TRUE;
 
-		clear_scan_trigger(device);
+	__connman_technology_enable_device(device);
 
-		g_hash_table_remove_all(device->networks);
+	return 0;
+}
 
-		if (driver->disable) {
-			err = driver->disable(device);
-			if (err == 0)
-				__connman_technology_disable_device(device);
-		} else
-			err = -EINVAL;
-	}
+int __connman_device_disable(struct connman_device *device)
+{
+	int err;
 
-	if (err == 0) {
-		device->powered = powered;
+	DBG("device %p", device);
 
-		if (device->registered == TRUE)
-			powered_changed(device);
+	if (!device->driver || !device->driver->disable)
+		return -EOPNOTSUPP;
+
+	if (device->powered == FALSE)
+		return -ENOLINK;
+
+	if (device->powered_pending == FALSE)
+		return -EALREADY;
+
+	device->reconnect = FALSE;
+
+	clear_scan_trigger(device);
+
+	g_hash_table_remove_all(device->networks);
+
+	err = device->driver->disable(device);
+	if (err < 0) {
+		if (err == -EINPROGRESS)
+			device->powered_pending = FALSE;
+		return err;
 	}
 
-	return err;
+	device->powered_pending = FALSE;
+	device->powered = FALSE;
+
+	__connman_technology_disable_device(device);
+
+	return 0;
+}
+
+static int set_powered(struct connman_device *device, connman_bool_t powered)
+{
+	DBG("device %p powered %d", device, powered);
+
+	if (powered == TRUE)
+		return __connman_device_enable(device);
+	else
+		return __connman_device_disable(device);
 }
 
 void __connman_device_list(DBusMessageIter *iter, void *user_data)
@@ -962,8 +989,10 @@
 		device->pending = NULL;
 	}
 
-	if (device->powered == powered)
+	if (device->powered == powered) {
+		device->powered_pending = powered;
 		return -EALREADY;
+	}
 
 	if (powered == TRUE)
 		__connman_device_enable(device);
@@ -978,6 +1007,11 @@
 	else
 		__connman_technology_disable_device(device);
 
+	if (device->offlinemode == TRUE && powered == TRUE) {
+		powered_changed(device);
+		return connman_device_set_powered(device, FALSE);
+	}
+
 	if (device->registered == FALSE)
 		return 0;
 
@@ -1029,74 +1063,26 @@
 	return device->driver->scan(device);
 }
 
-int __connman_device_enable(struct connman_device *device)
+int __connman_device_enable_persistent(struct connman_device *device)
 {
 	int err;
 
 	DBG("device %p", device);
 
-	if (!device->driver || !device->driver->enable)
-		return -EOPNOTSUPP;
-
-	if (device->powered_pending == TRUE)
-		return -EALREADY;
-
-	device->powered_pending = TRUE;
-
-	err = device->driver->enable(device);
-	if (err < 0)
-		return err;
-
-	device->powered = TRUE;
-
-	__connman_technology_enable_device(device);
-
-	return 0;
-}
-
-int __connman_device_enable_persistent(struct connman_device *device)
-{
-	DBG("device %p", device);
-
 	device->powered_persistent = TRUE;
 
 	__connman_storage_save_device(device);
 
-	return __connman_device_enable(device);
-}
-
-int __connman_device_disable(struct connman_device *device)
-{
-	int err;
-
-	DBG("device %p", device);
-
-	if (!device->driver || !device->driver->disable)
-		return -EOPNOTSUPP;
-
-	if (device->powered == FALSE)
-		return -ENOLINK;
-
-	if (device->powered_pending == FALSE)
-		return -EALREADY;
-
-	device->powered_pending = FALSE;
-
-	device->reconnect = FALSE;
-
-	clear_scan_trigger(device);
-
-	g_hash_table_remove_all(device->networks);
-
-	err = device->driver->disable(device);
-	if (err < 0)
-		return err;
-
-	device->powered = FALSE;
+	err = __connman_device_enable(device);
+	if (err == 0 || err == -EINPROGRESS) {
+		if (__connman_profile_get_offlinemode() == TRUE) {
+			device->offlinemode = FALSE;
+			__connman_profile_set_offlinemode(FALSE, FALSE);
+		}
 
-	__connman_technology_disable_device(device);
+	}
 
-	return 0;
+	return err;
 }
 
 int __connman_device_disable_persistent(struct connman_device *device)
--- src/element.c
+++ src/element.c
@@ -259,6 +259,7 @@
 struct find_data {
 	enum connman_service_type type;
 	struct connman_device *device;
+	connman_bool_t error;
 };
 
 static gboolean find_device(GNode *node, gpointer user_data)
@@ -341,6 +342,7 @@
 	struct connman_element *element = node->data;
 	struct find_data *data = user_data;
 	enum connman_service_type type;
+	int err;
 
 	if (element->type != CONNMAN_ELEMENT_TYPE_DEVICE)
 		return FALSE;
@@ -367,18 +369,23 @@
 		break;
 	}
 
-	__connman_device_enable_persistent(element->device);
+	err = __connman_device_enable_persistent(element->device);
+	if (err == 0 || (err < 0 && err == -EINPROGRESS))
+		data->error = FALSE;
 
 	return FALSE;
 }
 
 int __connman_element_enable_technology(enum connman_service_type type)
 {
-	struct find_data data = { .type = type, .device = NULL };
+	struct find_data data = { .type = type, .device = NULL, .error = TRUE };
 
 	g_node_traverse(element_root, G_PRE_ORDER,
 				G_TRAVERSE_ALL, -1, enable_technology, &data);
 
+	if (data.error == TRUE)
+		return -ENODEV;
+
 	return 0;
 }
 
@@ -387,6 +394,7 @@
 	struct connman_element *element = node->data;
 	struct find_data *data = user_data;
 	enum connman_service_type type;
+	int err;
 
 	if (element->type != CONNMAN_ELEMENT_TYPE_DEVICE)
 		return FALSE;
@@ -413,18 +421,23 @@
 		break;
 	}
 
-	__connman_device_disable_persistent(element->device);
+	err = __connman_device_disable_persistent(element->device);
+	if (err == 0 || (err < 0 && err == -EINPROGRESS))
+		data->error = FALSE;
 
 	return FALSE;
 }
 
 int __connman_element_disable_technology(enum connman_service_type type)
 {
-	struct find_data data = { .type = type, .device = NULL };
+	struct find_data data = { .type = type, .device = NULL, .error = TRUE };
 
 	g_node_traverse(element_root, G_PRE_ORDER,
 				G_TRAVERSE_ALL, -1, disable_technology, &data);
 
+	if (data.error == TRUE)
+		return -ENODEV;
+
 	return 0;
 }
 
--- src/manager.c
+++ src/manager.c
@@ -123,7 +123,7 @@
 
 		dbus_message_iter_get_basic(&value, &offlinemode);
 
-		__connman_profile_set_offlinemode(offlinemode);
+		__connman_profile_set_offlinemode(offlinemode, TRUE);
 
 		__connman_profile_save_default();
 	} else if (g_str_equal(name, "ActiveProfile") == TRUE) {
--- src/profile.c
+++ src/profile.c
@@ -96,7 +96,8 @@
 	return default_profile->offlinemode;
 }
 
-int __connman_profile_set_offlinemode(connman_bool_t offlinemode)
+int __connman_profile_set_offlinemode(connman_bool_t offlinemode,
+					connman_bool_t all_devices)
 {
 	DBG("offlinemode %d", offlinemode);
 
@@ -109,7 +110,8 @@
 	default_profile->offlinemode = offlinemode;
 	offlinemode_changed(default_profile);
 
-	__connman_device_set_offlinemode(offlinemode);
+	if (all_devices)
+		__connman_device_set_offlinemode(offlinemode);
 
 	return 0;
 }
@@ -479,7 +481,7 @@
 		g_dir_close(dir);
 	}
 
-	if (g_hash_table_size(profile_hash) == 0)
+	if (default_profile == NULL)
 		create_profile(PROFILE_DEFAULT_IDENT, "Default", NULL);
 
 	profiles_changed();

++++++ connman.yaml
--- connman.yaml
+++ connman.yaml
@@ -1,6 +1,6 @@
 Name: connman
 Summary: Connection Manager
-Version: 0.54.3
+Version: 0.54.4
 Release: 1
 Group: System/Networking
 License: GPLv2



More information about the MeeGo-commits mailing list