Comments (3)
The member internalDiscover
is only used when startDiscovery()
/ stopDiscovery()
is used.
The method isDiscovering()
will return true if internalDiscovery
is true (when startDiscovery()
was called and stopDiscovery()
was not yet called), or if the DBus-Response says discovery is active.
The internal member does not need to be initialized with false, because that is the default for primitive boolean members in Java.
The exception might occur because internalDiscovery
was not set correctly when startDiscovery()
/ stopDiscovery()
was called due to exception catched in these methods. Therefore isDiscovering()
still returns true/false and the start/stop method will be executed instead of being omitted.
Setting the member and calling start/stopDiscovery on DBus is not atomic, so in the current code, DBus is called first, then the member is changed. If DBus throws an exception, setting the member to true/false is never called, so the internalDiscovery
flag has the wrong state.
I change the code to first set the member, then call DBus.
from bluez-dbus.
Thanks for the explanation @hypfvieh
Is there a timeline for a new release incorporating some of the recent fixes?
from bluez-dbus.
no there is no timeline
from bluez-dbus.
Related Issues (20)
- How to pair a new device (phone) using bluez-dbus HOT 2
- New minor release with recent fixes HOT 1
- how to response to ATT `Handle Value Notification` HOT 1
- Possible Map marshalling/de-marshalling issue HOT 1
- Scan Response (Question) HOT 2
- GATTService address wrong ? HOT 3
- "could not load FFI provider jnr.ffi.provider.jffi.Provider" when using module-info.java HOT 1
- Ability to remove property and signal handlers from the com.github.hypfvieh.bluetooth.DeviceManager HOT 2
- Can I write a descriptor to enable notification? HOT 2
- bluez-dbus license HOT 1
- Question Mesh API support HOT 4
- File descriptors in method returns HOT 3
- Create A BLE Server HOT 1
- bluez-dbus with dbus-java 3.3.2 HOT 2
- How to use this library for Bluetooth intermediate communication HOT 22
- How to set bluetooth mtu HOT 3
- Unable to get Metadata PropertiesChanged of org.mpris.MediaPlayer2.Player HOT 4
- get RSSI fail HOT 2
- Bluetooth scanning can scan for devices that are turned off HOT 4
- Method "Disconnect" on interface "org.bluez.Device1" doesn't exist HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bluez-dbus.