Remove segmentation from ForwarderStatus retrieval
diff --git a/src/main/java/com/intel/jndn/management/NFD.java b/src/main/java/com/intel/jndn/management/NFD.java
index 56d98ff..e3cc825 100644
--- a/src/main/java/com/intel/jndn/management/NFD.java
+++ b/src/main/java/com/intel/jndn/management/NFD.java
@@ -90,11 +90,17 @@
*
* @param forwarder only a localhost Face
* @return the forwarder status object, see
- * http://redmine.named-data.net/projects/nfd/wiki/ForwarderStatus.
+ * <a href="http://redmine.named-data.net/projects/nfd/wiki/ForwarderStatus">
+ * http://redmine.named-data.net/projects/nfd/wiki/ForwarderStatus</a>.
* @throws java.lang.Exception
*/
public static ForwarderStatus getForwarderStatus(Face forwarder) throws Exception {
- Data data = retrieveDataSet(forwarder, new Name("/localhost/nfd/status"));
+ Interest interest = new Interest(new Name("/localhost/nfd/status"));
+ interest.setMustBeFresh(true);
+ interest.setChildSelector(Interest.CHILD_SELECTOR_RIGHT);
+ interest.setInterestLifetimeMilliseconds(DEFAULT_TIMEOUT);
+
+ Data data = SimpleClient.getDefault().getSync(forwarder, interest);
ForwarderStatus status = new ForwarderStatus();
status.wireDecode(data.getContent().buf());
return status;
diff --git a/src/test/java/com/intel/jndn/management/IntegrationSuite.java b/src/test/java/com/intel/jndn/management/IntegrationSuite.java
index d8e74e5..7e5461e 100644
--- a/src/test/java/com/intel/jndn/management/IntegrationSuite.java
+++ b/src/test/java/com/intel/jndn/management/IntegrationSuite.java
@@ -53,6 +53,7 @@
NFD.register(face, "udp4://127.0.0.1:56363", new Name("/my/test/route"), 999);
// check that route is created
+ Thread.sleep(1000); // NFD registers the route asynchronously
boolean found = false;
for(RibEntry route : NFD.getRouteList(face)){
logger.info("Found route: " + route.getName().toUri());