aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/gnunet/testbed/Controller.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/gnunet/testbed/Controller.java')
-rw-r--r--src/main/java/org/gnunet/testbed/Controller.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/main/java/org/gnunet/testbed/Controller.java b/src/main/java/org/gnunet/testbed/Controller.java
index 3a4c540..939f855 100644
--- a/src/main/java/org/gnunet/testbed/Controller.java
+++ b/src/main/java/org/gnunet/testbed/Controller.java
@@ -352,20 +352,16 @@ public class Controller {
352 * @param host host to run the controller on; This should be the same host if 352 * @param host host to run the controller on; This should be the same host if
353 * the controller was previously started with 353 * the controller was previously started with
354 * GNUNET_TESTBED_controller_start() 354 * GNUNET_TESTBED_controller_start()
355 * @param event_mask bit mask with set of events to call 'cc' for;
356 * or-ed values of "1LL" shifted by the
357 * respective 'enum GNUNET_TESTBED_EventType'
358 * (i.e. "(1LL << GNUNET_TESTBED_ET_CONNECT) | ...")
359 * @param cb controller callback to invoke on events
360 */ 355 */
361 public Controller(Host host, long event_mask, ControllerEventCallback cb) { 356 public Controller(Host host) {
362 this.host = host; 357 this.host = host;
363 client = new Client("testbed", host.cfg); 358 client = new Client("testbed", host.cfg);
364 client.installReceiver(new ControllerMessageReceiver()); 359 client.installReceiver(new ControllerMessageReceiver());
365 requests = new MatchingRequestContainer<Long, OperationRequest>(client); 360 requests = new MatchingRequestContainer<Long, OperationRequest>(client);
366 361
367 ControllerInitMessage m = new ControllerInitMessage(); 362 ControllerInitMessage m = new ControllerInitMessage();
368 m.event_mask = event_mask; 363 // we are interested in all events
364 m.event_mask = 1 | 2 | 4 | 8 | 16;
369 m.controler_hostname = (host.hostname == null) ? "127.0.0.1" : host.hostname; 365 m.controler_hostname = (host.hostname == null) ? "127.0.0.1" : host.hostname;
370 m.host_id = host.id; 366 m.host_id = host.id;
371 client.send(m); 367 client.send(m);
@@ -500,7 +496,6 @@ public class Controller {
500 return requests.addRequest(r.operationId, r); 496 return requests.addRequest(r.operationId, r);
501 } 497 }
502 498
503
504 public Cancelable requestInformation(PeerInformationCallback cb) { 499 public Cancelable requestInformation(PeerInformationCallback cb) {
505 PeerInformationRequest r = new PeerInformationRequest(this, cb); 500 PeerInformationRequest r = new PeerInformationRequest(this, cb);
506 return requests.addRequest(r.operationId, r); 501 return requests.addRequest(r.operationId, r);