Disconnecting Bluetooth Sockets, Network Functions Removed
Jerry and Sean fixed some things together.
Changes
--- BlueMesh/src/blue/mesh/BlueMeshService.java 4205cb83c2c14952f6cef3316e8386becf3031b2
+++ BlueMesh/src/blue/mesh/BlueMeshService.java 503309998ced3aca5b9c5357c23920e5671a7877
@@ -100,7 +100,8 @@
- return router.getNumberOfDevicesOnNetwork();
+ //Not Implemented
+ return 0;//router.getNumberOfDevicesOnNetwork();
--- BlueMesh/src/blue/mesh/ReadWriteThread.java 4205cb83c2c14952f6cef3316e8386becf3031b2
+++ BlueMesh/src/blue/mesh/ReadWriteThread.java 503309998ced3aca5b9c5357c23920e5671a7877
@@ -77,8 +77,8 @@
- // On exit close the in and out sockets (but NOT the Bluetooth socket?)
- // Is there ever a reason to do that? Say, suspend, etc.?
+ // On exit close the in and out sockets and the Bluetooth socket
+ router.notifyDisconnected(this.socket.getRemoteDevice());
@@ -91,8 +91,11 @@
-
- router.notifyDisconnected(this.socket.getRemoteDevice());
+ try {+ socket.close();
+ } catch (IOException e){+ Log.e(TAG, "could not close socket", e);
+ }
--- BlueMesh/src/blue/mesh/RouterObject.java 4205cb83c2c14952f6cef3316e8386becf3031b2
+++ BlueMesh/src/blue/mesh/RouterObject.java 503309998ced3aca5b9c5357c23920e5671a7877
@@ -166,11 +166,11 @@
- // Can we just get the number of active read/write threads at this time?
- // TODO: Ensure that the size of the rwThreads hashset is the number of connected devices.
+ //Deprecated: Uses System Message Level, not yet implemented
+ /*
- return rwThreads.size();
- }
+ return 0;//rwThreads.size(); Devices on NETWORK, not directly connected to this device
+ }*/

