diff options
| author | Johan Hedberg <johan.hedberg@nokia.com> | 2007-01-30 14:09:49 +0000 | 
|---|---|---|
| committer | Johan Hedberg <johan.hedberg@nokia.com> | 2007-01-30 14:09:49 +0000 | 
| commit | 885f18159e513ed1df4088918ea86b05555810e3 (patch) | |
| tree | 3d2a99eba6b00c9bd07993efe6d73103cd8f943a | |
| parent | 7c8be626e77b6138df3c18b1407a6eb038305573 (diff) | |
Make sure the device mode is only stored through a SetMode call
| -rw-r--r-- | hcid/dbus-adapter.c | 2 | ||||
| -rw-r--r-- | hcid/dbus-hci.c | 5 | 
2 files changed, 2 insertions, 5 deletions
| diff --git a/hcid/dbus-adapter.c b/hcid/dbus-adapter.c index 8699499a..a7dce984 100644 --- a/hcid/dbus-adapter.c +++ b/hcid/dbus-adapter.c @@ -485,6 +485,8 @@ static DBusHandlerResult adapter_set_mode(DBusConnection *conn,  			hci_close_dev(dd);  			return error_failed(conn, msg, bt_error(status));  		} + +		write_device_mode(&local, scan_mode);  	}  done: diff --git a/hcid/dbus-hci.c b/hcid/dbus-hci.c index c521d569..49da2140 100644 --- a/hcid/dbus-hci.c +++ b/hcid/dbus-hci.c @@ -311,7 +311,6 @@ static const DBusObjectPathVTable adapter_vtable = {  static void adapter_mode_changed(struct adapter *adapter, uint8_t mode)  { -	bdaddr_t local;  	DBusMessage *message;  	const char *scan_mode; @@ -341,10 +340,6 @@ static void adapter_mode_changed(struct adapter *adapter, uint8_t mode)  		return;  	} -	str2ba(adapter->address, &local); - -	write_device_mode(&local, scan_mode); -  	message = dev_signal_factory(adapter->dev_id, "ModeChanged",  					DBUS_TYPE_STRING, &scan_mode,  					DBUS_TYPE_INVALID); | 
