diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2009-08-01 01:13:56 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-08-01 01:14:06 +0300 |
commit | 005830e3f235618eeda4408340b2184097c0e8c7 (patch) | |
tree | 8184f79ceb5a5e3ee763fb846f54d39f86565a6b /src | |
parent | c1b999fbc96dfa28f119fe099d7c4b556c7523af (diff) |
Fix calling set_limited_discoverable twice
set_mode doesn't need to call set_limited_discoverable since
adapter_mode_changed will do it.
Diffstat (limited to 'src')
-rw-r--r-- | src/adapter.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/adapter.c b/src/adapter.c index 295cddc6..49ef35d8 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -467,12 +467,9 @@ static int set_mode(struct btd_adapter *adapter, uint8_t new_mode) adapter_set_discov_timeout(adapter, adapter->discov_timeout); - if (new_mode == MODE_LIMITED) + if (new_mode != MODE_LIMITED && adapter->mode == MODE_LIMITED) adapter_ops->set_limited_discoverable(adapter->dev_id, - adapter->dev.class, TRUE); - else if (adapter->mode == MODE_LIMITED) - adapter_ops->set_limited_discoverable(adapter->dev_id, - adapter->dev.class,FALSE); + adapter->dev.class, FALSE); } done: |