Commit 42462e1c authored by Roberta De Viti's avatar Roberta De Viti

print exception

parent a551f513
package org.mpisws.testapp.simulator;
public class Alarm {
}
package org.mpisws.testapp.simulator;
public class NullWakelock {
}
......@@ -29,7 +29,7 @@ import java.util.UUID;
*/
public class SimulationClientBT {
Context context;
protected static final int NUM_SIMULATED_DEVICES = 100;
protected static final int NUM_SIMULATED_DEVICES = 10;
protected static final int NUM_SIMULATED_EPOCHS = 10;
private static final String TAG = SimulationClientBT.class.getSimpleName();
......@@ -115,10 +115,13 @@ public class SimulationClientBT {
}
private void sendDHKeysOverSocket(BluetoothSocket sock) {
try {
if (sock == null) return;
OutputStream os = sock.getOutputStream();
ObjectOutputStream out = new ObjectOutputStream(os);
out.writeObject(mSharedSecrets);
out.writeObject(otherDHNonces);
out.writeObject(otherDHPubKeys);
......@@ -130,12 +133,15 @@ public class SimulationClientBT {
Log.d(TAG, "Got response: " + line);
in.close();
os.close();
out.close();
os.close();
sock.close();
} catch (IOException e) {
System.out.println("SimulationClient: General I/O exception: " + e.getMessage());
e.printStackTrace();
}
// run the simulator core
Log.d(TAG, "Running simulator core!");
new Thread(core).start();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment